From 3f575b5a274ef7b4327ea0a0e268baad365a41cd Mon Sep 17 00:00:00 2001 From: Innokentii Konstantinov Date: Wed, 5 Jul 2023 17:54:39 +0800 Subject: [PATCH] Fix phone provider initialization (#2434) --- engine/settings/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/settings/base.py b/engine/settings/base.py index b4bbe6e561..aaf1c2563b 100644 --- a/engine/settings/base.py +++ b/engine/settings/base.py @@ -724,8 +724,11 @@ class BrokerTypes: PHONE_PROVIDERS = { "twilio": "apps.twilioapp.phone_provider.TwilioPhoneProvider", # "simple": "apps.phone_notifications.simple_phone_provider.SimplePhoneProvider", - "zvonok": "apps.zvonok.phone_provider.ZvonokPhoneProvider", } + +if IS_OPEN_SOURCE: + PHONE_PROVIDERS["zvonok"] = "apps.zvonok.phone_provider.ZvonokPhoneProvider" + PHONE_PROVIDER = os.environ.get("PHONE_PROVIDER", default="twilio") ZVONOK_API_KEY = os.getenv("ZVONOK_API_KEY", None)