Yeuoly 1 рік тому
батько
коміт
337899a03d
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      api/core/workflow/nodes/code/code_node.py

+ 3 - 0
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):