summaryrefslogtreecommitdiff
path: root/schemas.py
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-05-09 01:19:08 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-05-09 01:19:08 -0700
commit75ce40635736260ce5a19b7a33856305ee516ccc (patch)
tree9db3931eae3dbd9308bab0e240e7c75950bcbd4c /schemas.py
parent3de7c5eed5ba262abf0d746211e33800db6d66df (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'schemas.py')
-rw-r--r--schemas.py4
1 files changed, 2 insertions, 2 deletions
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