Fix applied_filters template tag to use field-type-specific lookup labelsresolves

E.g. resolves gt="after" for dates vs "greater than" for numbers
This commit is contained in:
Jason Novinger
2025-11-24 16:11:12 -06:00
parent a2b1796ffc
commit 8de87140cc
2 changed files with 17 additions and 11 deletions

View File

@@ -208,8 +208,8 @@ class FilterModifierMixin:
Returns an empty list for fields that should not be enhanced.
"""
for field_class in field.__class__.__mro__:
if field_class in FORM_FIELD_LOOKUPS:
return FORM_FIELD_LOOKUPS[field_class]
if field_lookups := FORM_FIELD_LOOKUPS.get(field_class):
return field_lookups
return []