Fixed #27. Parts are now correctly summed up

This commit is contained in:
FrederikBaerentsen 2024-12-28 19:37:47 +01:00
parent 8c551f4bb5
commit 0a40d42b6c

2
app.py
View File

@ -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]