From 75ce40635736260ce5a19b7a33856305ee516ccc Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Sat, 9 May 2026 01:19:08 -0700 Subject: Simplify pantry UX and persist grocery check state server-side - Remove quantity, unit, expiry, and category fields from pantry form; auto-detect category via keyword map - Persist grocery item checked/unchecked state in DB via PATCH /api/grocery/{id}/check-item - Fix unchecking: previously bailed early and never removed the checked class - Fix NOT NULL constraint on ingredients.unit by defaulting to empty string Co-Authored-By: Claude Sonnet 4.6 --- schemas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'schemas.py') diff --git a/schemas.py b/schemas.py index fe7bee2..b21c1f0 100644 --- a/schemas.py +++ b/schemas.py @@ -6,8 +6,8 @@ from typing import Optional, List, Dict # Ingredient Schemas class IngredientCreate(BaseModel): name: str - quantity: float - unit: str + quantity: float = 1.0 + unit: str = "" category: Optional[str] = None expiry_date: Optional[date] = None -- cgit v1.3-2-g0d8e