-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Steps to reproduce
- Log in to DefectDojo: https://demo.defectdojo.org/
- Deactivate a test type:
- Go to Engagements -> Test Types -> some test type, e.g., "API Test".
- Switch off Active.
- Click Submit.
- Switch on Filter String Matching Optimization:
- Go to Configuration -> System Settings.
- Switch on Filter String Matching Optimization.
- Click Submit.
- Go to Findings -> Open Findings.
- Open the filters, click the "Test Type" dropdown.
Actual result
"API Test" is in the list.
Expected result
There is no "API Test" in the list.
Root cause
dojo.filters.FindingFilter.__init__ runs the following code, and dojo.filters.FindingFilterWithoutObjectLookups.__init__ does not.
django-DefectDojo/dojo/filters.py
Lines 2078 to 2079 in 24155ef
| if "test__test_type" in self.form.fields: | |
| self.form.fields["test__test_type"].queryset = get_visible_scan_types() |
Possible solution
Move the code to dojo.filters.FindingFilterHelper.__init__.