Update organic syn station.

This commit is contained in:
Xuwznln
2025-12-15 02:34:36 +08:00
parent 53219d8b04
commit 13a6795657
3 changed files with 35 additions and 23 deletions

View File

@@ -284,10 +284,18 @@ def modify_to_backend_format(data: list[dict[str, Any]]) -> list[dict[str, Any]]
edge["sourceHandle"] = port[source]
elif "source_port" in edge:
edge["sourceHandle"] = edge.pop("source_port")
else:
typ = edge.get("type")
if typ == "communication":
continue
if target in port:
edge["targetHandle"] = port[target]
elif "target_port" in edge:
edge["targetHandle"] = edge.pop("target_port")
else:
typ = edge.get("type")
if typ == "communication":
continue
edge["id"] = f"reactflow__edge-{source}-{edge['sourceHandle']}-{target}-{edge['targetHandle']}"
for key in ["source_port", "target_port"]:
if key in edge: