mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 05:55:52 +08:00
Fix/code transform result (#3203)
This commit is contained in:
parent
bae0c071cd
commit
337899a03d
@ -234,6 +234,9 @@ class CodeNode(BaseNode):
|
|||||||
parameters_validated = {}
|
parameters_validated = {}
|
||||||
for output_name, output_config in output_schema.items():
|
for output_name, output_config in output_schema.items():
|
||||||
dot = '.' if prefix else ''
|
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':
|
if output_config.type == 'object':
|
||||||
# check if output is object
|
# check if output is object
|
||||||
if not isinstance(result.get(output_name), dict):
|
if not isinstance(result.get(output_name), dict):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user