push_notifications: Move zilencer import inside ZILENCER_ENABLED check.

This commit is contained in:
Alex Vandiver
2021-10-20 06:16:10 +00:00
parent 111ee64e36
commit c0b557fb2e

View File

@@ -37,7 +37,6 @@ from zerver.models import (
get_display_recipient, get_display_recipient,
get_user_profile_by_id, get_user_profile_by_id,
) )
from zilencer.models import RemoteZulipServer
if TYPE_CHECKING: if TYPE_CHECKING:
import aioapns import aioapns
@@ -45,7 +44,7 @@ if TYPE_CHECKING:
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
if settings.ZILENCER_ENABLED: if settings.ZILENCER_ENABLED:
from zilencer.models import RemotePushDeviceToken from zilencer.models import RemotePushDeviceToken, RemoteZulipServer
DeviceToken = Union[PushDeviceToken, "RemotePushDeviceToken"] DeviceToken = Union[PushDeviceToken, "RemotePushDeviceToken"]