From 90ecb1af7f7bcbda2d0d5039460f19c3549711a8 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 15 Sep 2021 09:51:34 +0200 Subject: [PATCH] outposts: fix service account's permissions being checked twice Signed-off-by: Jens Langhammer --- authentik/outposts/tasks.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/authentik/outposts/tasks.py b/authentik/outposts/tasks.py index 71e9d0828..005e02245 100644 --- a/authentik/outposts/tasks.py +++ b/authentik/outposts/tasks.py @@ -100,7 +100,7 @@ def outpost_controller( if from_cache: outpost: Outpost = cache.get(CACHE_KEY_OUTPOST_DOWN % outpost_pk) else: - outpost: Outpost = Outpost.objects.get(pk=outpost_pk) + outpost: Outpost = Outpost.objects.filter(pk=outpost_pk).first() if not outpost: return self.set_uid(slugify(outpost.name)) @@ -148,10 +148,7 @@ def outpost_post_save(model_class: str, model_pk: Any): return if isinstance(instance, Outpost): - LOGGER.debug("Ensuring token and permissions for outpost", instance=instance) - _ = instance.token - _ = instance.user - LOGGER.debug("Trigger reconcile for outpost") + LOGGER.debug("Trigger reconcile for outpost", instance=instance) outpost_controller.delay(instance.pk) if isinstance(instance, (OutpostModel, Outpost)):