Skip to content

Commit 378e376

Browse files
committed
fix: Fix the non-empty check of the tool input parameters
1 parent 7da64a2 commit 378e376

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/tools/serializers/tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def get_field_value(debug_field_list, name, is_required):
431431

432432
@staticmethod
433433
def convert_value(name: str, value: str, _type: str, is_required: bool):
434-
if not is_required and value is None:
434+
if not is_required and (value is None or (isinstance(value, str) and len(value.strip()) == 0)):
435435
return None
436436
try:
437437
if _type == 'int':

0 commit comments

Comments
 (0)