ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / po / powerdns-admin / 0005-Use-app-context-to-create-routes.patch
blobb6931c25d546c7d3ace41c50f26b5db319e315ce
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.
7 ---
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
17 assets.init_app(app)
18 models.init_app(app)
19 - routes.init_app(app)
20 + with app.app_context():
21 + routes.init_app(app)
22 services.init_app(app)
24 # Register filters
25 --
26 2.42.0