Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

api_docs: Fix 500 error on `/api/register-remote-push-device`.

Prakhar Pratyush271aba001c09
diff --git a/zerver/views/documentation.py b/zerver/views/documentation.py
index 47197135259..aff82efc032 100644
--- a/zerver/views/documentation.py
+++ b/zerver/views/documentation.py
@@ -50,7 +50,7 @@ def add_api_url_context(
context.update(zulip_default_context(request))
if is_zilencer_endpoint:
- context["api_url"] = settings.ZULIP_SERVICES_URL + "/api"
+ context["api_url"] = (settings.ZULIP_SERVICES_URL or "https://push.zulipchat.com") + "/api"
return
subdomain = get_subdomain(request)
diff --git a/zproject/default_settings.py b/zproject/default_settings.py
index b5b17010190..5c45392d1da 100644
--- a/zproject/default_settings.py
+++ b/zproject/default_settings.py
@@ -231,7 +231,7 @@ PASSWORD_MIN_GUESSES = 10000
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # 2 weeks
-ZULIP_SERVICES_URL = "https://push.zulipchat.com"
+ZULIP_SERVICES_URL: str | None = "https://push.zulipchat.com"
ZULIP_SERVICE_PUSH_NOTIFICATIONS = False
# For this setting, we need to have None as the default value, so