mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Add docstring for NullableMultipleChoiceFilter
This commit is contained in:
parent
98ba553466
commit
4f9e7db23f
@ -18,6 +18,7 @@ __all__ = (
|
|||||||
'MultiValueTimeFilter',
|
'MultiValueTimeFilter',
|
||||||
'MultiValueWWNFilter',
|
'MultiValueWWNFilter',
|
||||||
'NullableCharFieldFilter',
|
'NullableCharFieldFilter',
|
||||||
|
'NullableMultipleChoiceFilter',
|
||||||
'NumericArrayFilter',
|
'NumericArrayFilter',
|
||||||
'TreeNodeMultipleChoiceFilter',
|
'TreeNodeMultipleChoiceFilter',
|
||||||
)
|
)
|
||||||
@ -144,7 +145,9 @@ class NullableCharFieldFilter(django_filters.CharFilter):
|
|||||||
|
|
||||||
|
|
||||||
class NullableMultipleChoiceFilter(django_filters.MultipleChoiceFilter):
|
class NullableMultipleChoiceFilter(django_filters.MultipleChoiceFilter):
|
||||||
|
"""
|
||||||
|
Similar to NullableCharFieldFilter, but allows multiple values including the special NULL string.
|
||||||
|
"""
|
||||||
def filter(self, qs, value):
|
def filter(self, qs, value):
|
||||||
if settings.FILTERS_NULL_CHOICE_VALUE in value:
|
if settings.FILTERS_NULL_CHOICE_VALUE in value:
|
||||||
value.append('')
|
value.append('')
|
||||||
|
Loading…
Reference in New Issue
Block a user