fix: Default value for form node reference parameter checkbox (#3953)

v3.2
shaohuzhang1 2025-08-28 11:22:56 +08:00 committed by GitHub
parent 4786970689
commit 269c12b737
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ def get_default_option(option_list, _type, value_field):
if option_list is not None and isinstance(option_list, list) and len(option_list) > 0:
default_value_list = [o.get(value_field) for o in option_list if o.get('default')]
if len(default_value_list) == 0:
return [o.get(value_field) for o in option_list] if _type == 'MultiSelect' else option_list[0].get(
return [option_list[0].get(
value_field)] if _type == 'MultiSelect' else option_list[0].get(
value_field)
else:
if _type == 'MultiSelect':