refactor(backend): drop the legacy products.printer_zone_id and its print fallbacks

Routing has been by prep zone only since v1, which nulled this column on every start, so the four fallbacks in printer_service.py never ran. Revision 0012 drops the column (its unnamed FK goes with the batch rebuild). The unused legacy GET /api/kds/items keeps its single 'no zone' group. Product create/update/export/import no longer mention it. Scheduled in plan step 1.0 for the catalogue rework (1.13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 12:28:13 +02:00
co-authored by Claude Opus 5.5
parent 82c6ca4e0a
commit 3c5751025c
8 changed files with 37 additions and 57 deletions
-3
View File
@@ -56,7 +56,6 @@ def _serialize_product(p: Product) -> dict:
return {
"name": p.name, "base_price": p.base_price, "is_available": p.is_available,
"lifecycle_status": p.lifecycle_status, "sort_order": p.sort_order,
"printer_zone_id": None, # always stripped on export
"quick_options": quick_options, "options": options,
"ingredients": ingredients, "preference_sets": preference_sets,
}
@@ -179,7 +178,6 @@ def import_catalog(payload: dict, db: Session = Depends(get_db), user: User = De
existing.lifecycle_status = prod_data.get("lifecycle_status", "active")
existing.sort_order = prod_data.get("sort_order", 0)
existing.category_id = category_id
existing.printer_zone_id = None
db.flush()
product = existing
else:
@@ -190,7 +188,6 @@ def import_catalog(payload: dict, db: Session = Depends(get_db), user: User = De
lifecycle_status=prod_data.get("lifecycle_status", "active"),
sort_order=prod_data.get("sort_order", 0),
category_id=category_id,
printer_zone_id=None,
)
db.add(product)
db.flush()