diff --git a/api/core/workflow/nodes/code/code_node.py b/api/core/workflow/nodes/code/code_node.py index 17554d3db4574b..335991ae87c285 100644 --- a/api/core/workflow/nodes/code/code_node.py +++ b/api/core/workflow/nodes/code/code_node.py @@ -88,9 +88,9 @@ def _check_string(self, value: str, variable: str) -> str: else: raise ValueError(f"Output variable `{variable}` must be a string") - if len(value) > dify_config.CODE_MAX_STRING_ARRAY_LENGTH: + if len(value) > dify_config.CODE_MAX_STRING_LENGTH: raise ValueError(f'The length of output variable `{variable}` must be' - f' less than {dify_config.CODE_MAX_STRING_ARRAY_LENGTH} characters') + f' less than {dify_config.CODE_MAX_STRING_LENGTH} characters') return value.replace('\x00', '')