Can't delete a new part

master
assar 8 years ago
parent d5cf5d34f9
commit 5eb3cb6e46

@ -119,6 +119,8 @@ def alter(partID):
@app.route('/parts/delete/<partID>')
def delete(partID):
if partID < 0:
abort(400)
s = text('delete from parts where id=:id;')
r = db_engine.execute(s, id=partID)
return '{"status":"ok"}'

@ -174,6 +174,8 @@ function text_filter(string) {
}
function delete_entry(partID) {
if (partID < 0)
return;
if (!confirm('Delete the selected entry?'))
return;
$.ajax({

Loading…
Cancel
Save