Update routes.py

Fixed a bug where redirect was incorrect after adding an item
This commit is contained in:
2025-08-11 16:36:51 +02:00
parent 79f7364c5a
commit 72fe1b602b

View File

@@ -117,6 +117,7 @@ def step3_alt1_post(input: str):
) )
db.session.commit() db.session.commit()
print("[DEBUG] New FoodItem Added") print("[DEBUG] New FoodItem Added")
input = barcode if barcode else name # update input
else: else:
print(f"Item exists: {item.barcode} {item.name}") print(f"Item exists: {item.barcode} {item.name}")