Skip to content
Snippets Groups Projects
Commit 4395eb10 authored by Julian Rother's avatar Julian Rother
Browse files

Fixed bug in db query code

parent d0c6f1a5
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ def query(operation, *params):
cur.execute(operation.replace('?', '%s'), params)
return cur.fetchall()
elif config['DB_ENGINE'] == 'sqlite':
if 'db' not in g or not g.db.is_connected():
if 'db' not in g:
g.db = sqlite3.connect(config['SQLITE_DB'])
g.db.row_factory = dict_factory
cur = g.db.cursor()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment