Fix DBCONNSTRING

This commit is contained in:
Phillip Kühne 2022-07-15 15:35:58 +02:00
parent 72914109c0
commit bc44985fed
Signed by: phillip
GPG Key ID: E4C1C4D2F90902AA

View File

@ -18,6 +18,7 @@ connection = None
def open_db() -> engine.base.Connection: def open_db() -> engine.base.Connection:
global connection global connection
if (not connection): if (not connection):
print(current_app.config.get("DBCONNSTRING"))
engine = create_engine(current_app.config.get("DBCONNSTRING")) engine = create_engine(current_app.config.get("DBCONNSTRING"))
connection = engine.connect() connection = engine.connect()
# cur.execute('PRAGMA encoding = "UTF-8";') # cur.execute('PRAGMA encoding = "UTF-8";')