bug: (#7586 followup) fix config of CODE_MAX_STRING_LENGTH (#7683)

pull/7715/head
Bowen Liang 1 year ago committed by GitHub
parent 35431bce0d
commit a15080a1d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -88,9 +88,9 @@ class CodeNode(BaseNode):
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', '')

Loading…
Cancel
Save