Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Fix/code transform result (#3203)

Yeuoly337899a03d04
diff --git a/api/core/workflow/nodes/code/code_node.py b/api/core/workflow/nodes/code/code_node.py
index 097dbb660c8..bc1b8d7ce1e 100644
--- a/api/core/workflow/nodes/code/code_node.py
+++ b/api/core/workflow/nodes/code/code_node.py
@@ -234,6 +234,9 @@ class CodeNode(BaseNode):
parameters_validated = {}
for output_name, output_config in output_schema.items():
dot = '.' if prefix else ''
+ if output_name not in result:
+ raise ValueError(f'Output {prefix}{dot}{output_name} is missing.')
+
if output_config.type == 'object':
# check if output is object
if not isinstance(result.get(output_name), dict):