stages/invitation: don't use uuid.hex
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
1419910b29
commit
2af4f28239
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Reference in New Issue