mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-10 18:39:36 -06:00
Removed explicit checks against QueryField and [Null]BooleanField
I did add them to FORM_FIELD_LOOKUPS, though, to underscore that they were considered and are intentially empty for future devs.
This commit is contained in:
parent
860bdae1e9
commit
edbcea817c
@ -21,6 +21,9 @@ __all__ = (
|
||||
|
||||
# Mapping of form field types to their supported lookups
|
||||
FORM_FIELD_LOOKUPS = {
|
||||
QueryField: [],
|
||||
forms.BooleanField: [],
|
||||
forms.NullBooleanField: [],
|
||||
forms.CharField: [
|
||||
('exact', _('Is')),
|
||||
('n', _('Is Not')),
|
||||
@ -204,12 +207,6 @@ class FilterModifierMixin:
|
||||
|
||||
Returns an empty list for fields that should not be enhanced.
|
||||
"""
|
||||
if isinstance(field, QueryField):
|
||||
return []
|
||||
|
||||
if isinstance(field, (forms.BooleanField, forms.NullBooleanField)):
|
||||
return []
|
||||
|
||||
for field_class in field.__class__.__mro__:
|
||||
if field_class in FORM_FIELD_LOOKUPS:
|
||||
return FORM_FIELD_LOOKUPS[field_class]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user