From 5d51621278b27af2449fdb3c2da0bc5cc91458b4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 12 Dec 2022 15:31:56 +0000 Subject: [PATCH] stages/user_write: always ignore `component` field and prevent warning Signed-off-by: Jens Langhammer --- authentik/stages/user_write/stage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/stages/user_write/stage.py b/authentik/stages/user_write/stage.py index 5fb2db6f5..05f71ebe4 100644 --- a/authentik/stages/user_write/stage.py +++ b/authentik/stages/user_write/stage.py @@ -73,7 +73,9 @@ class UserWriteStageView(StageView): """Update `user` with data from plan context Only simple attributes are updated, nothing which requires a foreign key or m2m""" - data = self.executor.plan.context[PLAN_CONTEXT_PROMPT] + data: dict = self.executor.plan.context[PLAN_CONTEXT_PROMPT] + # This is always sent back but not written to the user + data.pop("component", None) for key, value in data.items(): setter_name = f"set_{key}" # Check if user has a setter for this key, like set_password