Skip to content

Commit

Permalink
bug: (#7586 followup) fix config of CODE_MAX_STRING_LENGTH (#7683)
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenliang123 authored Aug 27, 2024
1 parent 35431bc commit a15080a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/core/workflow/nodes/code/code_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', '')

Expand Down

0 comments on commit a15080a

Please sign in to comment.