Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ def get_settings(from_db=False):
if not from_db and 'custom_settings' in current_app.config:
return current_app.config['custom_settings']
s = Setting.query.order_by(desc(Setting.id)).first()
app_environment = current_app.config.get('ENV', 'production')
if s is None:
set_settings(secret='super secret key', app_name='Open Event')
set_settings(secret='super secret key', app_name='Open Event', app_environment=app_environment)
else:
current_app.config['custom_settings'] = make_dict(s)
if not current_app.config['custom_settings'].get('secret'):
set_settings(secret='super secret key', app_name='Open Event')
set_settings(secret='super secret key', app_name='Open Event', app_environment=app_environment)
return current_app.config['custom_settings']


Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class TestingConfig(Config):

ENV = 'testing'
TESTING = True
CELERY_ALWAYS_EAGER = True
CELERY_TASK_ALWAYS_EAGER = True
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
SQLALCHEMY_RECORD_QUERIES = True
DEBUG_TB_ENABLED = False
Expand Down