fix: compatibility with multi-design schema for scan/zigbee/liveview/CustomStyleModal

- liveview.py: replace hardcoded CanvasState PK lookup (get(1)) with
  design_id-aware query; filter nodes/edges by design_id
- scan.py: add design_id to bulk approve, single approve, and edge
  resolution Node/Edge constructors (fallback to first design)
- zigbee.py: add design_id to coordinator auto-approval Node constructor
- schemas/nodes.py: add design_id to NodeCreate and NodeResponse
- schemas/edges.py: add design_id to EdgeCreate
- CustomStyleModal.tsx: add 'electrical' to EDITABLE_EDGE_TYPES
This commit is contained in:
Pranjal Joshi
2026-05-31 14:44:17 +05:30
parent 46435605eb
commit 3a57d809a4
6 changed files with 41 additions and 9 deletions
+3 -1
View File
@@ -34,7 +34,7 @@ class NodeBase(BaseModel):
class NodeCreate(NodeBase):
pass
design_id: str | None = None
class NodeUpdate(BaseModel):
@@ -68,6 +68,8 @@ class NodeUpdate(BaseModel):
class NodeResponse(NodeBase):
id: str
design_id: str | None = None
ieee_address: str | None = None
last_seen: datetime | None = None
response_time_ms: int | None = None
created_at: datetime