From 192b954bb3c0716ef12fb7097f74921ada15d193 Mon Sep 17 00:00:00 2001
From: Julian Rother <julian@cccv.de>
Date: Wed, 24 Aug 2022 15:36:31 +0200
Subject: [PATCH] Fix flask shell command for Buster

---
 uffd/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/uffd/__init__.py b/uffd/__init__.py
index ad186dee..bfb32ff2 100644
--- a/uffd/__init__.py
+++ b/uffd/__init__.py
@@ -85,7 +85,9 @@ def create_app(test_config=None): # pylint: disable=too-many-locals,too-many-sta
 
 	@app.shell_context_processor
 	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.
 	# non-IANA TZ values) LOCALTZ is stdlib-style (without normalize/localize)
-- 
GitLab