mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Updated clean method on DynamicModelMultipleChoiceField to return the name.
This commit is contained in:
parent
558a9beda2
commit
6c51b89502
@ -197,6 +197,6 @@ class DynamicModelMultipleChoiceField(DynamicModelChoiceMixin, forms.ModelMultip
|
||||
# string 'null'. This will check for that condition and gracefully handle the conversion to a NoneType.
|
||||
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 [None, *value]
|
||||
return [None, *super().clean(value)]
|
||||
|
||||
return super().clean(value)
|
||||
|
Loading…
Reference in New Issue
Block a user