fix: persist top/left/right connection-point counts (issue #243)
The backend only stored bottom_handles, so top/left/right_handles were dropped on canvas save and reset to defaults on reload — a left/right snappoint would vanish after reload. - models.py: add top_handles (default 1), left_handles (0), right_handles (0) - database.py: ALTER TABLE migrations for the three columns - schemas: add fields to NodeBase, NodeUpdate, and the canvas-save node schema - tests: save+reload round-trip and default-fallback coverage ha-relevant: no
This commit is contained in:
@@ -34,6 +34,9 @@ class NodeSave(BaseModel):
|
||||
width: float | None = None
|
||||
height: float | None = None
|
||||
bottom_handles: int = 1
|
||||
top_handles: int = 1
|
||||
left_handles: int = 0
|
||||
right_handles: int = 0
|
||||
pos_x: float = 0
|
||||
pos_y: float = 0
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@ class NodeBase(BaseModel):
|
||||
width: float | None = None
|
||||
height: float | None = None
|
||||
bottom_handles: int = 1
|
||||
top_handles: int = 1
|
||||
left_handles: int = 0
|
||||
right_handles: int = 0
|
||||
|
||||
|
||||
class NodeCreate(NodeBase):
|
||||
@@ -66,6 +69,9 @@ class NodeUpdate(BaseModel):
|
||||
width: float | None = None
|
||||
height: float | None = None
|
||||
bottom_handles: int | None = None
|
||||
top_handles: int | None = None
|
||||
left_handles: int | None = None
|
||||
right_handles: int | None = None
|
||||
|
||||
|
||||
class NodeResponse(NodeBase):
|
||||
|
||||
Reference in New Issue
Block a user