From e550216f85e86128caafad5e66e8ba77209b575c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 11 Feb 2021 23:36:22 +0100 Subject: [PATCH] events: fix user QuerySet being passed --- authentik/events/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/events/tasks.py b/authentik/events/tasks.py index 6027ecb97..8f6309da7 100644 --- a/authentik/events/tasks.py +++ b/authentik/events/tasks.py @@ -54,7 +54,7 @@ def event_trigger_handler(event_uuid: str, trigger_name: str): return LOGGER.debug("e(trigger): checking if trigger applies", trigger=trigger) - user = User.objects.filter(pk=event.user.get("pk")) or get_anonymous_user() + user = User.objects.filter(pk=event.user.get("pk")).first() or get_anonymous_user() policy_engine = PolicyEngine(trigger, user) policy_engine.mode = PolicyEngineMode.MODE_OR policy_engine.empty_result = False