diff --git a/platipy/backend/__init__.py b/platipy/backend/__init__.py index ae836e57..94c62626 100644 --- a/platipy/backend/__init__.py +++ b/platipy/backend/__init__.py @@ -65,6 +65,8 @@ def on_celery_setup_logging(**kwargs): app = FlaskApp(__name__) app.config["SECRET_KEY"] = uuid.uuid4().hex +app.app_context().push() + # Configure SQL Alchemy app.config["SQLALCHEMY_DATABASE_URI"] = f"sqlite:///{env_work}/{os.path.basename(os.getcwd())}.db" app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False