From 0a40d42b6c2a63386dfb0cf5b3b7972e9af733cf Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Sat, 28 Dec 2024 19:37:47 +0100 Subject: [PATCH] Fixed #27. Parts are now correctly summed up --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 119dfac..89567cf 100644 --- a/app.py +++ b/app.py @@ -515,7 +515,7 @@ def missing(): def parts(): conn = sqlite3.connect('app.db') cursor = conn.cursor() - cursor.execute('SELECT id, part_num, color_id, color_name, element_id, part_img_url_id, SUM(quantity) AS total_quantity, name FROM inventory GROUP BY id, part_num, part_img_url_id, color_id, color_name, element_id, name;') + cursor.execute('SELECT id, part_num, color_id, color_name, element_id, part_img_url_id, SUM(quantity) AS total_quantity, name FROM inventory GROUP BY part_num, part_img_url_id, color_id, color_name, element_id, name;') results = cursor.fetchall() missing_list = [list(i) for i in results]