Browse Source

fix(code_node): type checking bypass

Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/2.0.0-beta.1
-LAN- 1 month ago
parent
commit
aff7ca12b8
No account linked to committer's email address
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      api/core/workflow/nodes/code/code_node.py

+ 4
- 1
api/core/workflow/nodes/code/code_node.py View File



elif output_config.type == SegmentType.STRING: elif output_config.type == SegmentType.STRING:
# check if string available # check if string available
value = result.get("output_name")
if value is not None and not isinstance(value, str):
raise OutputValidationError(f"Output value `{value}` is not string")
transformed_result[output_name] = self._check_string( transformed_result[output_name] = self._check_string(
value=result[output_name],
value=value,
variable=f"{prefix}{dot}{output_name}", variable=f"{prefix}{dot}{output_name}",
) )
elif output_config.type == SegmentType.BOOLEAN: elif output_config.type == SegmentType.BOOLEAN:

Loading…
Cancel
Save