diff --git a/src/teams/signal_handlers.py b/src/teams/signal_handlers.py index 40056c24..0cce9cb7 100644 --- a/src/teams/signal_handlers.py +++ b/src/teams/signal_handlers.py @@ -1,6 +1,5 @@ import logging -from .email import add_new_membership_email logger = logging.getLogger("bornhack.%s" % __name__) @@ -12,6 +11,8 @@ def teammember_saved(sender, instance, created, **kwargs): # if this is a new unapproved teammember send a mail to team responsibles if created and not instance.approved: # call the mail sending function + # late import to please django 3.2 or "django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet." + from .email import add_new_membership_email if not add_new_membership_email(instance): logger.error("Error adding email to outgoing queue")