about summary refs log tree commit diff
path: root/pkgs/applications/networking/powerdns-admin/0004-Fix-flask-session-and-powerdns-admin-compatibility.patch
blob: b1aaa8c531d17d56edfef1564ea91c63793ff3e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 4b4ac26ef1cbb0b5b2354c251b216498325d0411 Mon Sep 17 00:00:00 2001
From: Flakebi <flakebi@t-online.de>
Date: Sat, 2 Dec 2023 16:31:50 +0100
Subject: [PATCH 4/6] Fix flask-session and powerdns-admin compatibility

flask-session and powerdns-admin both try to add sqlalchemy to flask.
Reuse the database for flask-session.
---
 powerdnsadmin/__init__.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/powerdnsadmin/__init__.py b/powerdnsadmin/__init__.py
index d447a00..653af33 100755
--- a/powerdnsadmin/__init__.py
+++ b/powerdnsadmin/__init__.py
@@ -60,6 +60,7 @@ def create_app(config=None):
     if 'SESSION_TYPE' in os.environ:
         app.config['SESSION_TYPE'] = os.environ.get('SESSION_TYPE')
 
+    app.config['SESSION_SQLALCHEMY'] = models.base.db
     sess = Session(app)
 
     # create sessions table if using sqlalchemy backend
-- 
2.42.0