Commit 4395eb10 authored by Julian Rother's avatar Julian Rother
Browse files

Fixed bug in db query code

parent d0c6f1a5
......@@ -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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment