Fixed deleting
This commit is contained in:
+1
-1
@@ -239,7 +239,7 @@ def alter(partID):
|
|||||||
@app.route('/parts/delete/<partID>')
|
@app.route('/parts/delete/<partID>')
|
||||||
# @requires_auth
|
# @requires_auth
|
||||||
def delete(partID):
|
def delete(partID):
|
||||||
if partID < 0:
|
if int(partID) < 0:
|
||||||
abort(400)
|
abort(400)
|
||||||
s = text('delete from parts where id=:id;')
|
s = text('delete from parts where id=:id;')
|
||||||
r = db_engine.execute(s, id=partID)
|
r = db_engine.execute(s, id=partID)
|
||||||
|
|||||||
Reference in New Issue
Block a user