From 2f41d61cfbac6fd7537cadf86ce58d0aca689132 Mon Sep 17 00:00:00 2001 From: Johanna England Date: Mon, 12 Feb 2024 08:57:44 +0100 Subject: [PATCH] fixup! Add filtering of incidents by a profile pk --- src/argus/incident/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/argus/incident/filters.py b/src/argus/incident/filters.py index 2ee6e3470..6b921c9ac 100644 --- a/src/argus/incident/filters.py +++ b/src/argus/incident/filters.py @@ -59,7 +59,7 @@ def qs(self): if notificationprofile_pk: profile = NotificationProfile.objects.filter(pk=notificationprofile_pk).first() - if profile or profile.user != self.request.user: + if profile and profile.user != self.request.user: return queryset.none() return queryset