Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Nov 24, 2023
1 parent 29603a2 commit 160313c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apolpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ def _fetch():


def _insert(var):
return db.session.execute(text(INSERT), var)
print(text(INSERT))
res = db.session.execute(text(INSERT), var)
print(res)
print(db.session.commit())
return res


@app.route("/organism/findAllOrganisms", methods=["GET", "POST"])
Expand Down Expand Up @@ -187,5 +191,6 @@ def insert():
# This is terrible.
req_json['id'] = -int(time.time())

print(_insert(req_json))
for row in _insert(req_json):
print(row)
return jsonify({})

0 comments on commit 160313c

Please sign in to comment.