refactor: remove personal_rating, DRY get_or_404, fix ty errors

- Drop Product.personal_rating from model, API schemas, and all frontend
  views (list table, detail view, quick-edit form, new-product form)
- Extract get_or_404 into backend/innercontext/api/utils.py; remove five
  duplicate copies from individual API modules
- Fix all ty type errors: generic get_or_404 with TypeVar, cast() in
  coerce_effect_profile validator, col() for ilike on SQLModel column,
  dict[str, Any] annotation in test helper, ty: ignore for CORSMiddleware

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Piotr Oleszczyk 2026-02-27 11:20:13 +01:00
parent 5e3c0c97e5
commit 6333c6678a
15 changed files with 30 additions and 81 deletions

View file

@ -149,7 +149,6 @@ export interface Product {
is_medication: boolean;
is_tool: boolean;
needle_length_mm?: number;
personal_rating?: number;
personal_tolerance_notes?: string;
personal_repurchase_intent?: boolean;
created_at: string;