diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-09 01:19:08 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-09 01:19:08 -0700 |
| commit | 75ce40635736260ce5a19b7a33856305ee516ccc (patch) | |
| tree | 9db3931eae3dbd9308bab0e240e7c75950bcbd4c /schemas.py | |
| parent | 3de7c5eed5ba262abf0d746211e33800db6d66df (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.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |
