From 1745306cc69486e3defeeb14388ba9a107ac6579 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 15 May 2021 17:45:33 +0200 Subject: [PATCH] outposts: fix error when controller loads from cache but cache has expired Signed-off-by: Jens Langhammer --- authentik/outposts/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/outposts/tasks.py b/authentik/outposts/tasks.py index b3f2fb1f7..2768e8374 100644 --- a/authentik/outposts/tasks.py +++ b/authentik/outposts/tasks.py @@ -100,6 +100,8 @@ def outpost_controller( outpost: Outpost = cache.get(CACHE_KEY_OUTPOST_DOWN % outpost_pk) else: outpost: Outpost = Outpost.objects.get(pk=outpost_pk) + if not outpost: + return self.set_uid(slugify(outpost.name)) try: controller = controller_for_outpost(outpost)