stages/invitation: remove invitation from plan context after deletion
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
cb64eed90d
commit
f978575293
|
@ -79,7 +79,9 @@ class InvitationFinalStageView(StageView):
|
||||||
if not invitation:
|
if not invitation:
|
||||||
LOGGER.warning("InvitationFinalStageView stage called without invitation")
|
LOGGER.warning("InvitationFinalStageView stage called without invitation")
|
||||||
return HttpResponseBadRequest
|
return HttpResponseBadRequest
|
||||||
if not invitation.single_use:
|
token = invitation.invite_uuid.hex
|
||||||
return self.executor.stage_ok()
|
if invitation.single_use:
|
||||||
invitation.delete()
|
invitation.delete()
|
||||||
|
LOGGER.debug("Deleted invitation", token=token)
|
||||||
|
del self.executor.plan.context[INVITATION]
|
||||||
return self.executor.stage_ok()
|
return self.executor.stage_ok()
|
||||||
|
|
Reference in New Issue