From 5d3931c12896a210e7bf94e28cb338bf7933f6c3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 28 Jun 2021 20:15:00 +0200 Subject: [PATCH] events: ignore notification non-existent in transport Signed-off-by: Jens Langhammer --- authentik/events/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/events/tasks.py b/authentik/events/tasks.py index 6ce94fa90..48879a45e 100644 --- a/authentik/events/tasks.py +++ b/authentik/events/tasks.py @@ -105,7 +105,9 @@ def notification_transport( """Send notification over specified transport""" self.save_on_success = False try: - notification: Notification = Notification.objects.get(pk=notification_pk) + notification: Notification = Notification.objects.filter(pk=notification_pk).first() + if not notification: + return transport: NotificationTransport = NotificationTransport.objects.get( pk=transport_pk )