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:
@@ -317,7 +317,6 @@ class ProductBase(BaseModel):
|
||||
unit_type: str = "piece"
|
||||
is_available: bool = True
|
||||
lifecycle_status: str = "active"
|
||||
printer_zone_id: Optional[int] = None # kept for backward compat; use prep_zone_ids instead
|
||||
prep_zone_ids: List[int] = []
|
||||
sort_order: int = 0
|
||||
# Xenia Connect — digital menu overrides
|
||||
@@ -359,7 +358,6 @@ class ProductUpdate(BaseModel):
|
||||
unit_type: Optional[str] = None
|
||||
is_available: Optional[bool] = None
|
||||
lifecycle_status: Optional[str] = None
|
||||
printer_zone_id: Optional[int] = None
|
||||
prep_zone_ids: Optional[List[int]] = None
|
||||
sort_order: Optional[int] = None
|
||||
quick_options: Optional[List[ProductQuickOptionCreate]] = None
|
||||
@@ -426,7 +424,6 @@ class ProductOut(ProductBase):
|
||||
'unit_type': getattr(data, 'unit_type', 'piece') or 'piece',
|
||||
'is_available': data.is_available,
|
||||
'lifecycle_status': data.lifecycle_status,
|
||||
'printer_zone_id': data.printer_zone_id,
|
||||
'prep_zone_ids': [z.id for z in data.prep_zones] if hasattr(data, 'prep_zones') else [],
|
||||
'sort_order': data.sort_order,
|
||||
'image_url': data.image_url,
|
||||
|
||||
Reference in New Issue
Block a user