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

Add db teardown function

parent eebad983
Branches
No related tags found
No related merge requests found
......@@ -96,6 +96,12 @@ def commit_db(*args):
request.db.close()
g.db.commit()
@app.teardown_appcontext
def close_db(*args):
if 'db' in g:
g.db.close()
del g.db
def searchquery(text, columns, match, tables, suffix, *suffixparams):
params = []
subexprs = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment