fix: select field not work when it is not required (#5101)
This commit is contained in:
parent
ea69dc2a7e
commit
e04fc9b304
2 changed files with 20 additions and 7 deletions
|
|
@ -210,7 +210,7 @@ class ToolManager:
|
|||
if parameter_rule.type == ToolParameter.ToolParameterType.SELECT:
|
||||
# check if tool_parameter_config in options
|
||||
options = list(map(lambda x: x.value, parameter_rule.options))
|
||||
if parameter_value not in options:
|
||||
if parameter_value is not None and parameter_value not in options:
|
||||
raise ValueError(
|
||||
f"tool parameter {parameter_rule.name} value {parameter_value} not in options {options}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue