From 857a48012e40e5efc8cdb7a1535ef4fb3ab20f38 Mon Sep 17 00:00:00 2001 From: Yongtao Huang Date: Mon, 22 Sep 2025 10:01:21 +0800 Subject: [PATCH] Fix: use data.type instead of type when checking datasource node (#25965) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- api/services/rag_pipeline/rag_pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services/rag_pipeline/rag_pipeline.py b/api/services/rag_pipeline/rag_pipeline.py index 1e0578d12f..fdaaa73bcc 100644 --- a/api/services/rag_pipeline/rag_pipeline.py +++ b/api/services/rag_pipeline/rag_pipeline.py @@ -1381,8 +1381,8 @@ class RagPipelineService: datasource_nodes = workflow.graph_dict.get("nodes", []) datasource_plugins = [] for datasource_node in datasource_nodes: - if datasource_node.get("type") == "datasource": - datasource_node_data = datasource_node.get("data", {}) + if datasource_node.get("data", {}).get("type") == "datasource": + datasource_node_data = datasource_node["data"] if not datasource_node_data: continue