From 75d2a0ec322a999a330af55c5410c19e6cd79f1d Mon Sep 17 00:00:00 2001 From: -LAN- Date: Mon, 23 Dec 2024 15:08:00 +0800 Subject: [PATCH] fix: skip invalid source_node_id in end stream generator router Signed-off-by: -LAN- --- api/core/workflow/nodes/end/end_stream_generate_router.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/core/workflow/nodes/end/end_stream_generate_router.py b/api/core/workflow/nodes/end/end_stream_generate_router.py index ea8b6b50420c99..f40a22336c3877 100644 --- a/api/core/workflow/nodes/end/end_stream_generate_router.py +++ b/api/core/workflow/nodes/end/end_stream_generate_router.py @@ -135,6 +135,9 @@ def _recursive_fetch_end_dependencies( reverse_edges = reverse_edge_mapping.get(current_node_id, []) for edge in reverse_edges: source_node_id = edge.source_node_id + # found sometimes source_node_id is not in node_id_config_mapping, temporary fix by skip it + if source_node_id not in node_id_config_mapping: + continue source_node_type = node_id_config_mapping[source_node_id].get("data", {}).get("type") if source_node_type in { NodeType.IF_ELSE.value,