File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ def with_compliance_data(self):
219219 self .with_risk_threshold ()
220220 .with_vulnerability_counts ()
221221 .with_license_compliance_counts ()
222+ .with_policy_violation_count ()
222223 .annotate (package_count = Count ("productpackages" , distinct = True ))
223224 .order_by (
224225 F ("max_risk_score" ).desc (nulls_last = True ),
@@ -230,12 +231,13 @@ def with_compliance_data(self):
230231 )
231232
232233 def with_compliance_issues (self ):
233- """Filter to products that have license or critical/high vulnerability issues."""
234+ """Filter to products that have license, vulnerability, or policy violation issues."""
234235 return self .filter (
235236 Q (license_error_count__gt = 0 )
236237 | Q (license_warning_count__gt = 0 )
237238 | Q (critical_count__gt = 0 )
238239 | Q (high_count__gt = 0 )
240+ | Q (policy_violation_count__gt = 0 )
239241 )
240242
241243 def with_has_vulnerable_packages (self ):
Original file line number Diff line number Diff line change @@ -3106,7 +3106,6 @@ def get_queryset(self):
31063106 get_viewable_products (self .request .user )
31073107 .with_compliance_data ()
31083108 .with_has_vulnerable_packages ()
3109- .with_policy_violation_count ()
31103109 )
31113110
31123111 def get_context_data (self , ** kwargs ):
You can’t perform that action at this time.
0 commit comments