Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/17575-nullable-multiple-choice-f…
Browse files Browse the repository at this point in the history
…ilter' into 17575-nullable-multiple-choice-filter

# Conflicts:
#	netbox/netbox/filtersets.py
  • Loading branch information
bctiemann committed Oct 11, 2024
2 parents c2473e6 + 3a2046b commit 2ad87cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netbox/netbox/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ def get_additional_lookups(cls, existing_filter_name, existing_filter):
# create the new filter with the same type because there is no guarantee the defined type
# is the same as the default type for the field
resolve_field(field, lookup_expr) # Will raise FieldLookupError if the lookup is invalid
for field_to_remove in ('choices', 'null_value'):
existing_filter_extra.pop(field_to_remove, None)
filter_cls = type(existing_filter)
if lookup_expr == 'empty':
filter_cls = django_filters.BooleanFilter
Expand Down

0 comments on commit 2ad87cb

Please sign in to comment.