From 48a907ae4580f77eea74180c826952c8c3d3d5e7 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 7 Sep 2022 08:09:28 -0700 Subject: [PATCH] #9231 add comment --- netbox/netbox/filtersets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netbox/netbox/filtersets.py b/netbox/netbox/filtersets.py index 2e535266d..b6776e3c1 100644 --- a/netbox/netbox/filtersets.py +++ b/netbox/netbox/filtersets.py @@ -81,6 +81,9 @@ class BaseFilterSet(django_filters.FilterSet): }) def __init__(self, *args, **kwargs): + # bit of a hack for #9231 - extras.lookup.Empty is registered in apps.ready + # however FilterSet Factory is setup before this which creates the + # initial filters. This recreates the filters so Empty is picked up correctly. self.base_filters = self.__class__.get_filters() super().__init__(*args, **kwargs)