mirror of https://github.com/zulip/zulip.git
thumbor: Fix handling of upgrades from 1.8.0 and older.
Apparently, our thumbor logic assumed S3_REGION would be present in prod_settings.py. While it is in newer Zulip releases, upgraded servers won't have a copy of this field.
This commit is contained in:
parent
ff9714eb32
commit
2e533f32c2
|
@ -657,7 +657,14 @@ RESULT_STORAGE_STORES_UNSAFE = True
|
|||
|
||||
if not IS_LOCAL_STORAGE:
|
||||
if PRODUCTION:
|
||||
from zproject.prod_settings import S3_AUTH_UPLOADS_BUCKET, S3_REGION
|
||||
from zproject.prod_settings import S3_AUTH_UPLOADS_BUCKET
|
||||
try:
|
||||
from zproject.prod_settings import S3_REGION
|
||||
except ImportError:
|
||||
# If you upgraded from older Zulip,
|
||||
# prod_settings_template.py didn't have S3_REGION before,
|
||||
# so we should just assume the default value.
|
||||
S3_REGION = ''
|
||||
else:
|
||||
from zproject.dev_settings import S3_AUTH_UPLOADS_BUCKET, S3_REGION
|
||||
|
||||
|
|
Loading…
Reference in New Issue