diff --git a/dojo/filters.py b/dojo/filters.py index 4ae5224dab..1f0894ae1b 100644 --- a/dojo/filters.py +++ b/dojo/filters.py @@ -1889,6 +1889,8 @@ class FindingFilterHelper(FilterSet): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + if "test__test_type" in self.form.fields: + self.form.fields["test__test_type"].queryset = get_visible_scan_types() def set_date_fields(self, *args: list, **kwargs: dict): date_input_widget = forms.DateInput(attrs={"class": "datepicker", "placeholder": "YYYY-MM-DD"}, format="%Y-%m-%d") @@ -2075,9 +2077,6 @@ def __init__(self, *args, **kwargs): # Don't show the product filter on the product finding view self.set_related_object_fields(*args, **kwargs) - if "test__test_type" in self.form.fields: - self.form.fields["test__test_type"].queryset = get_visible_scan_types() - def set_related_object_fields(self, *args: list, **kwargs: dict): finding_group_query = Finding_Group.objects.all() if self.pid is not None: