1 From 3eb1a408758b68543c73d5214b467c2905fbea2a Mon Sep 17 00:00:00 2001
2 From: Flakebi <flakebi@t-online.de>
3 Date: Sat, 2 Dec 2023 16:32:36 +0100
4 Subject: [PATCH 5/6] Use app context to create routes
6 Routes creates session database tables, so it needs a context.
8 powerdnsadmin/__init__.py | 3 ++-
9 1 file changed, 2 insertions(+), 1 deletion(-)
11 diff --git a/powerdnsadmin/__init__.py b/powerdnsadmin/__init__.py
12 index 653af33..bc6f7df 100755
13 --- a/powerdnsadmin/__init__.py
14 +++ b/powerdnsadmin/__init__.py
15 @@ -73,7 +73,8 @@ def create_app(config=None):
16 # Load app's components
19 - routes.init_app(app)
20 + with app.app_context():
21 + routes.init_app(app)
22 services.init_app(app)