mirror of https://github.com/zulip/zulip.git
signals: Lazily import zerver.actions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
21cd1c10b3
commit
9a80847366
|
@ -9,7 +9,6 @@ from django.utils.timezone import now as timezone_now
|
|||
from django.utils.translation import gettext as _
|
||||
|
||||
from confirmation.models import one_click_unsubscribe_link
|
||||
from zerver.lib.actions import do_set_zoom_token
|
||||
from zerver.lib.queue import queue_json_publish
|
||||
from zerver.lib.send_email import FromAddress
|
||||
from zerver.models import UserProfile
|
||||
|
@ -107,5 +106,8 @@ def email_on_new_login(sender: Any, user: UserProfile, request: Any, **kwargs: A
|
|||
def clear_zoom_token_on_logout(
|
||||
sender: object, *, user: Optional[UserProfile], **kwargs: object
|
||||
) -> None:
|
||||
# Loaded lazily so django.setup() succeeds before static asset generation
|
||||
from zerver.lib.actions import do_set_zoom_token
|
||||
|
||||
if user is not None and user.zoom_token is not None:
|
||||
do_set_zoom_token(user, None)
|
||||
|
|
Loading…
Reference in New Issue