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

query now returns lastrowid for INSERT commands

parent 838b5bd0
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,8 @@ def query(operation, *params):
rows = request.db.fetchall()
except:
rows = []
if not rows and request.db.lastrowid != None:
return request.db.lastrowid
return rows
@app.teardown_request
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment