From 7d41feb7f3c398e4c5cc49b56652fb72629d41f1 Mon Sep 17 00:00:00 2001 From: Blake Owens Date: Wed, 10 Jan 2024 17:21:54 -0600 Subject: [PATCH] fix sla violation filter to return only active, sla violating findings --- dojo/filters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dojo/filters.py b/dojo/filters.py index 739427cb7c4..fb6d413ed13 100644 --- a/dojo/filters.py +++ b/dojo/filters.py @@ -153,8 +153,8 @@ def sla_satisfied(self, qs, name): return qs.filter(Q(sla_expiration_date__isnull=True) | Q(sla_expiration_date__gt=timezone.now().date())) def sla_violated(self, qs, name): - # return findings that have an sla expiration date before today - return qs.filter(sla_expiration_date__lt=timezone.now().date()) + # return active findings that have an sla expiration date before today + return qs.filter(Q(active=True) & Q(sla_expiration_date__lt=timezone.now().date())) options = { None: (_('Any'), any),