From 070790252af5c27161e4e446ecfe47c109b03991 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Mon, 26 Jan 2026 17:46:44 +0100 Subject: [PATCH] :bug: Fix "Test Type" filter dropdown includes inactive test types #14161 --- dojo/filters.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dojo/filters.py b/dojo/filters.py index 4ae5224dab6..1f0894ae1b5 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: