mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Return cleaned null_option
value as None
in dynamic multi-select field
This commit is contained in:
@ -485,5 +485,5 @@ class DynamicModelMultipleChoiceField(DynamicModelChoiceMixin, forms.ModelMultip
|
||||
"""
|
||||
if self.null_option is not None and settings.FILTERS_NULL_CHOICE_VALUE in value:
|
||||
value = [v for v in value if v != settings.FILTERS_NULL_CHOICE_VALUE]
|
||||
return [self.null_option, *value]
|
||||
return [None, *value]
|
||||
return super().clean(value)
|
||||
|
Reference in New Issue
Block a user