From 167a444349f7877eaea12f1d48a44f1c812209e9 Mon Sep 17 00:00:00 2001 From: Mateusz779 Date: Fri, 14 Apr 2023 14:16:03 +0200 Subject: [PATCH] bug --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index cc78814..c03bc9f 100644 --- a/app.py +++ b/app.py @@ -157,12 +157,12 @@ def get_image(): @app.route("/api/release_allocation", methods=['POST']) def release_allocation(): try: - name = db.get_conf_image(request.headers['name']) - if name is None or name == "": + id_allocation = db.get_conf_id_name(request.headers['name']) + if id_allocation is None or id_allocation == "": return jsonify(message="400") except: pass - id_allocation = db.get_conf_id_name(name) + if id_allocation is not None: db.del_image_allocation_id(id_allocation) else: