signup: Implement use of MultiUseInvite.status attribute.

This allows us to revoke MultiUseInvites by changing their .status
instead of deleting them (which has been deleting the helpful tracking
information on PreregistrationUsers about which MultiUseInvite they came
from).
This commit is contained in:
Mateusz Mandera
2022-09-12 00:39:43 +02:00
committed by Tim Abbott
parent 977a043d03
commit d201229df8
6 changed files with 58 additions and 5 deletions

View File

@@ -99,7 +99,7 @@ def get_object_from_key(
raise ConfirmationKeyException(ConfirmationKeyException.EXPIRED)
if mark_object_used:
# MultiuseInvite objects have no status field, since they are
# MultiuseInvite objects do not use the STATUS_USED status, since they are
# intended to be used more than once.
assert confirmation.type != Confirmation.MULTIUSE_INVITE
assert hasattr(obj, "status")