diff --git a/app/settings/__init__.py b/app/settings/__init__.py index 96d9c04848..09913aecea 100644 --- a/app/settings/__init__.py +++ b/app/settings/__init__.py @@ -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'] diff --git a/config.py b/config.py index dc7d3f2f6a..78e9231d9b 100644 --- a/config.py +++ b/config.py @@ -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