mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Fix the non-empty check of the tool input parameters
This commit is contained in:
parent
9a474b2302
commit
2cdd42ccd3
|
|
@ -431,7 +431,7 @@ class ToolSerializer(serializers.Serializer):
|
|||
|
||||
@staticmethod
|
||||
def convert_value(name: str, value: str, _type: str, is_required: bool):
|
||||
if not is_required and value is None:
|
||||
if not is_required and (value is None or (isinstance(value, str) and len(value.strip()) == 0)):
|
||||
return None
|
||||
try:
|
||||
if _type == 'int':
|
||||
|
|
|
|||
Loading…
Reference in New Issue