diff --git a/authentik/stages/invitation/migrations/0001_squashed_0006_invitation_name.py b/authentik/stages/invitation/migrations/0001_squashed_0006_invitation_name.py index 7802cbe60..a9feff06e 100644 --- a/authentik/stages/invitation/migrations/0001_squashed_0006_invitation_name.py +++ b/authentik/stages/invitation/migrations/0001_squashed_0006_invitation_name.py @@ -17,7 +17,7 @@ def migrate_add_name(apps: Apps, schema_editor: BaseDatabaseSchemaEditor): Invitation = apps.get_model("authentik_stages_invitation", "invitation") for invite in Invitation.objects.using(db_alias).all(): - invite.name = invite.pk.hex + invite.name = str(invite.pk) invite.save() diff --git a/authentik/stages/invitation/migrations/0006_invitation_name.py b/authentik/stages/invitation/migrations/0006_invitation_name.py index acbeb5a3b..abbc66b5a 100644 --- a/authentik/stages/invitation/migrations/0006_invitation_name.py +++ b/authentik/stages/invitation/migrations/0006_invitation_name.py @@ -11,7 +11,7 @@ def migrate_add_name(apps: Apps, schema_editor: BaseDatabaseSchemaEditor): Invitation = apps.get_model("authentik_stages_invitation", "invitation") for invite in Invitation.objects.using(db_alias).all(): - invite.name = invite.pk.hex + invite.name = str(invite.pk) invite.save() diff --git a/authentik/stages/invitation/stage.py b/authentik/stages/invitation/stage.py index c9d5883d7..b4735e562 100644 --- a/authentik/stages/invitation/stage.py +++ b/authentik/stages/invitation/stage.py @@ -81,7 +81,7 @@ class InvitationFinalStageView(StageView): if not invitation: self.logger.warning("InvitationFinalStageView stage called without invitation") return HttpResponseBadRequest - token = invitation.invite_uuid.hex + token = str(invitation.invite_uuid) if invitation.single_use: invitation.delete() self.logger.debug("Deleted invitation", token=token)