Updated clean method on DynamicModelMultipleChoiceField to return the name.

This commit is contained in:
Julio-Oliveira-Encora 2024-05-17 12:48:34 -03:00 committed by Jeremy Stretch
parent 558a9beda2
commit 6c51b89502

View File

@ -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)