From 5be152e12dc97c323e9b67768e7fa08e39891277 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 24 Aug 2021 10:57:20 +0200 Subject: [PATCH] stages/password: fix migration error Signed-off-by: Jens Langhammer --- .../stages/password/migrations/0006_passwordchange_rename.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/stages/password/migrations/0006_passwordchange_rename.py b/authentik/stages/password/migrations/0006_passwordchange_rename.py index e3f24799fc..98a9c7ee5f 100644 --- a/authentik/stages/password/migrations/0006_passwordchange_rename.py +++ b/authentik/stages/password/migrations/0006_passwordchange_rename.py @@ -12,6 +12,8 @@ def rename_default_prompt_stage(apps: Apps, schema_editor: BaseDatabaseSchemaEdi if not stages.exists(): return stage = stages.first() + if PromptStage.objects.using(db_alias).filter(name="default-password-change-prompt").exists(): + return stage.name = "default-password-change-prompt" stage.save()