context_processors: Remove unnecessary get_client_name call.

This detail is now being managed by our middleware.
This commit is contained in:
Tim Abbott 2021-04-29 17:10:10 -07:00
parent fe260fb892
commit 3cf0156997
1 changed files with 1 additions and 7 deletions

View File

@ -14,7 +14,6 @@ from version import (
LATEST_RELEASE_VERSION,
ZULIP_VERSION,
)
from zerver.decorator import get_client_name
from zerver.lib.exceptions import InvalidSubdomainError
from zerver.lib.realm_description import get_realm_rendered_description, get_realm_text_description
from zerver.lib.realm_icon import get_realm_icon_url
@ -131,11 +130,6 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
f'<a href="mailto:{escape(support_email)}">{escape(support_email)}</a>'
)
# We can't use request.client here because we might not be using
# an auth decorator that sets it, but we can call its helper to
# get the same result.
platform = get_client_name(request)
default_page_params = {
**DEFAULT_PAGE_PARAMS,
"request_language": get_language(),
@ -170,7 +164,7 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
"settings_path": settings_path,
"secrets_path": secrets_path,
"settings_comments_path": settings_comments_path,
"platform": platform,
"platform": request.client_name,
"allow_search_engine_indexing": allow_search_engine_indexing,
"landing_page_navbar_message": settings.LANDING_PAGE_NAVBAR_MESSAGE,
"default_page_params": default_page_params,