diff --git a/frontend/src/components/ShoppingEventForm.tsx b/frontend/src/components/ShoppingEventForm.tsx index eb07aa3..c19fa42 100644 --- a/frontend/src/components/ShoppingEventForm.tsx +++ b/frontend/src/components/ShoppingEventForm.tsx @@ -90,7 +90,7 @@ const ShoppingEventForm: React.FC = () => { }; const addGroceryToEvent = () => { - if (newGroceryItem.grocery_id > 0 && newGroceryItem.amount > 0 && newGroceryItem.price > 0) { + if (newGroceryItem.grocery_id > 0 && newGroceryItem.amount > 0 && newGroceryItem.price >= 0) { setSelectedGroceries([...selectedGroceries, { ...newGroceryItem }]); setNewGroceryItem({ grocery_id: 0, amount: 1, price: 0 }); }