修改问题

This commit is contained in:
strepsiades
2026-04-01 17:04:26 +08:00
parent 7c49df94fc
commit 9a3a34c58b
10 changed files with 119 additions and 29 deletions
@@ -115,7 +115,9 @@ async def refresh_bind_data_id(
continue
remote_node_id = local_to_remote.get(local_node.node_id)
remote_node = remote_collection.get_by_node_id(remote_node_id) if remote_node_id else None
if remote_node and remote_node.data_id:
local_status = getattr(local_node.status, "value", None)
remote_status = getattr(remote_node.status, "value", None) if remote_node is not None else None
if local_status != "FAILED" and remote_node and remote_node.data_id and remote_status != "FAILED":
local_node.context["bind_data_id"] = remote_node.data_id
else:
local_node.context.pop("bind_data_id", None)
@@ -126,7 +128,9 @@ async def refresh_bind_data_id(
continue
local_node_id = remote_to_local.get(remote_node.node_id)
local_node = local_collection.get_by_node_id(local_node_id) if local_node_id else None
if local_node and local_node.data_id:
remote_status = getattr(remote_node.status, "value", None)
local_status = getattr(local_node.status, "value", None) if local_node is not None else None
if remote_status != "FAILED" and local_node and local_node.data_id and local_status != "FAILED":
remote_node.context["bind_data_id"] = local_node.data_id
else:
remote_node.context.pop("bind_data_id", None)