mirror of https://github.com/zulip/zulip.git
models: Add RealmReactivationStatus to ConfirmObjT.
We added RealmReactivationStatus as a possible confirmation object in #22584. We also need to add this type to ConfirmationObjT. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
parent
43213ea37b
commit
ed77684427
|
@ -19,7 +19,14 @@ from django.utils.timezone import now as timezone_now
|
||||||
|
|
||||||
from confirmation import settings as confirmation_settings
|
from confirmation import settings as confirmation_settings
|
||||||
from zerver.lib.types import UnspecifiedValue
|
from zerver.lib.types import UnspecifiedValue
|
||||||
from zerver.models import EmailChangeStatus, MultiuseInvite, PreregistrationUser, Realm, UserProfile
|
from zerver.models import (
|
||||||
|
EmailChangeStatus,
|
||||||
|
MultiuseInvite,
|
||||||
|
PreregistrationUser,
|
||||||
|
Realm,
|
||||||
|
RealmReactivationStatus,
|
||||||
|
UserProfile,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ConfirmationKeyException(Exception):
|
class ConfirmationKeyException(Exception):
|
||||||
|
@ -47,7 +54,14 @@ def generate_key() -> str:
|
||||||
return b32encode(secrets.token_bytes(15)).decode().lower()
|
return b32encode(secrets.token_bytes(15)).decode().lower()
|
||||||
|
|
||||||
|
|
||||||
ConfirmationObjT = Union[MultiuseInvite, PreregistrationUser, EmailChangeStatus, UserProfile, Realm]
|
ConfirmationObjT = Union[
|
||||||
|
MultiuseInvite,
|
||||||
|
PreregistrationUser,
|
||||||
|
EmailChangeStatus,
|
||||||
|
UserProfile,
|
||||||
|
Realm,
|
||||||
|
RealmReactivationStatus,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def get_object_from_key(
|
def get_object_from_key(
|
||||||
|
|
Loading…
Reference in New Issue