debug
This commit is contained in:
parent
6eb9729742
commit
bb6f3f68d4
2
app.py
2
app.py
@ -164,7 +164,7 @@ def release_allocation():
|
|||||||
pass
|
pass
|
||||||
print(id_allocation)
|
print(id_allocation)
|
||||||
if id_allocation is not None:
|
if id_allocation is not None:
|
||||||
print(db.del_image_allocation_id(id_allocation))
|
print(db.del_image_allocation_id_image(id_allocation))
|
||||||
else:
|
else:
|
||||||
return jsonify(message="404")
|
return jsonify(message="404")
|
||||||
|
|
||||||
|
12
db.py
12
db.py
@ -261,6 +261,18 @@ def del_image_allocation_token(token):
|
|||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def del_image_allocation_id_image(id_image):
|
||||||
|
connect()
|
||||||
|
with get_cur() as cur:
|
||||||
|
cur.execute("""
|
||||||
|
DELETE FROM image_allocation WHERE id_image = %s
|
||||||
|
""",(id_image,))
|
||||||
|
try:
|
||||||
|
conn.commit()
|
||||||
|
return True
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
|
||||||
def del_image_allocation_id(id):
|
def del_image_allocation_id(id):
|
||||||
connect()
|
connect()
|
||||||
with get_cur() as cur:
|
with get_cur() as cur:
|
||||||
|
Loading…
Reference in New Issue
Block a user