From 3d2dd3d8deee720f3772020de1be3558e0d6a2dd Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Sat, 9 Aug 2025 14:25:07 +0200 Subject: [PATCH] change order of values in image insert --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 60ca4f0..dd081e9 100644 --- a/main.py +++ b/main.py @@ -146,7 +146,7 @@ def upload(): if cur.fetchone(): return Response("You can touch grass multiple times. I believe in you. Dont submit the same images.", 400) - cur.execute("INSERT INTO Images (username, filename, image_hash) VALUES (?, ?, ?)", (username, image_uuid, image_hash)) + cur.execute("INSERT INTO Images (image_hash, username, filename) VALUES (?, ?, ?)", (image_hash, image_uuid, username)) get_db().commit() with open(f"{UPLOAD_DIR}/{image_uuid}.{image_type}", "wb") as file: