From 6d9030e2401ff3200bdbf7336eed56a122437938 Mon Sep 17 00:00:00 2001 From: Paul Traylor Date: Tue, 1 Aug 2023 16:32:07 +0900 Subject: [PATCH] fixup! Filter for sent/error --- promgen/templates/promgen/alert_list.html | 4 ++-- promgen/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/promgen/templates/promgen/alert_list.html b/promgen/templates/promgen/alert_list.html index a3b4586a1..9c8c491f2 100644 --- a/promgen/templates/promgen/alert_list.html +++ b/promgen/templates/promgen/alert_list.html @@ -20,8 +20,8 @@ Service Project Job - Sent - Error + Sent + Error {% for alert in alert_list %} {% ifchanged alert.created|date %} diff --git a/promgen/views.py b/promgen/views.py index 38b1f26fc..a4be5db72 100644 --- a/promgen/views.py +++ b/promgen/views.py @@ -1015,9 +1015,9 @@ def get_queryset(self): for key, value in self.request.GET.items(): if key in ["page", "search"]: continue - elif key == "sent": + elif key == "noSent": qs = qs.filter(sent_count=0) - elif key == "error": + elif key == "sentError": qs = qs.exclude(error_count=0) else: qs = qs.filter(alertlabel__name=key, alertlabel__value=value)