mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-05 05:45:10 +00:00
Fix edge id
This commit is contained in:
@@ -153,7 +153,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 200,
|
||||
"y": 150,
|
||||
@@ -174,7 +174,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 250,
|
||||
"y": 150,
|
||||
@@ -195,7 +195,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 300,
|
||||
"y": 150,
|
||||
@@ -216,7 +216,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 900,
|
||||
"y": 150,
|
||||
@@ -237,7 +237,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 950,
|
||||
"y": 150,
|
||||
@@ -302,7 +302,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 400,
|
||||
"y": 450,
|
||||
@@ -387,7 +387,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 500,
|
||||
"y": 400,
|
||||
@@ -406,7 +406,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 1100,
|
||||
"y": 500,
|
||||
@@ -570,7 +570,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 900,
|
||||
"y": 500,
|
||||
@@ -589,7 +589,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 950,
|
||||
"y": 500,
|
||||
@@ -608,7 +608,7 @@
|
||||
"children": [],
|
||||
"parent": "ComprehensiveProtocolStation",
|
||||
"type": "container",
|
||||
"class": null,
|
||||
"class": "container",
|
||||
"position": {
|
||||
"x": 1050,
|
||||
"y": 500,
|
||||
|
||||
@@ -175,8 +175,7 @@ def modify_to_backend_format(data: list[dict[str, Any]]) -> list[dict[str, Any]]
|
||||
edge["targetHandle"] = port[target]
|
||||
elif "target_port" in edge:
|
||||
edge["targetHandle"] = edge.pop("target_port")
|
||||
if "id" not in edge:
|
||||
edge["id"] = f"reactflow__edge-{edge['sourceHandle']}-{edge['targetHandle']}"
|
||||
edge["id"] = f"reactflow__edge-{source}-{edge['sourceHandle']}-{target}-{edge['targetHandle']}"
|
||||
for key in ["source_port", "target_port"]:
|
||||
if key in edge:
|
||||
edge.pop(key)
|
||||
|
||||
Reference in New Issue
Block a user