Fixed #27. Parts are now correctly summed up
This commit is contained in:
parent
8c551f4bb5
commit
0a40d42b6c
2
app.py
2
app.py
@ -515,7 +515,7 @@ def missing():
|
|||||||
def parts():
|
def parts():
|
||||||
conn = sqlite3.connect('app.db')
|
conn = sqlite3.connect('app.db')
|
||||||
cursor = conn.cursor()
|
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()
|
results = cursor.fetchall()
|
||||||
missing_list = [list(i) for i in results]
|
missing_list = [list(i) for i in results]
|
||||||
|
Loading…
Reference in New Issue
Block a user