Appeasing pylance.

This commit is contained in:
Yaro Kasear 2025-07-11 14:28:43 -05:00
parent 9d0dad8d74
commit 2fd607a61a

View file

@ -79,7 +79,10 @@ def delete_image(image_id):
if not image:
return jsonify({"success": False, "error": "Image not found"})
abs_path = os.path.join(current_app.static_folder, image.filename.replace("\\", "/"))
rel_path = posixpath.normpath(str(image.filename))
static_dir = str(current_app.static_folder) # appease the gods
abs_path = os.path.join(static_dir, rel_path)
if os.path.exists(abs_path):
os.remove(abs_path)