Skip to content
Snippets Groups Projects
Commit 192b954b authored by Julian's avatar Julian
Browse files

Fix flask shell command for Buster

parent 4bc7ffd0
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,9 @@ def create_app(test_config=None): # pylint: disable=too-many-locals,too-many-sta ...@@ -85,7 +85,9 @@ def create_app(test_config=None): # pylint: disable=too-many-locals,too-many-sta
@app.shell_context_processor @app.shell_context_processor
def push_request_context(): #pylint: disable=unused-variable def push_request_context(): #pylint: disable=unused-variable
return {'db': db} | {name: getattr(models, name) for name in models.__all__} ctx = {name: getattr(models, name) for name in models.__all__}
ctx.setdefault('db', db)
return ctx
# flask-babel requires pytz-style timezone objects, but in rare cases (e.g. # flask-babel requires pytz-style timezone objects, but in rare cases (e.g.
# non-IANA TZ values) LOCALTZ is stdlib-style (without normalize/localize) # non-IANA TZ values) LOCALTZ is stdlib-style (without normalize/localize)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment