From 9d790f1eda1b71ac1f688a352bfd9bbd86f20f52 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:42:36 +0800 Subject: [PATCH] fix: When referencing workflow fields, if the node is not executed, return None data (#3724) --- apps/application/flow/workflow_manage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/application/flow/workflow_manage.py b/apps/application/flow/workflow_manage.py index 7496e01fe..3964b04f1 100644 --- a/apps/application/flow/workflow_manage.py +++ b/apps/application/flow/workflow_manage.py @@ -755,7 +755,10 @@ class WorkflowManage: if node_id == 'global': return INode.get_field(self.context, fields) else: - return self.get_node_by_id(node_id).get_reference_field(fields) + node = self.get_node_by_id(node_id) + if node: + return node.get_reference_field(fields) + return None def get_workflow_content(self): context = {