fix(code_node): type checking bypass

Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
-LAN- 2025-09-04 19:25:08 +08:00
parent ad9eed2551
commit aff7ca12b8
No known key found for this signature in database
GPG Key ID: 6BA0D108DED011FF
1 changed files with 4 additions and 1 deletions

View File

@ -265,8 +265,11 @@ class CodeNode(Node):
elif output_config.type == SegmentType.STRING:
# 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(
value=result[output_name],
value=value,
variable=f"{prefix}{dot}{output_name}",
)
elif output_config.type == SegmentType.BOOLEAN: