mirror of https://github.com/zulip/zulip.git
check_subdomain: Remove case for user_subdomain being None.
With REALMS_HAVE_SUBDOMAINS always on, user_subdomain is never None, so this was just dead code.
This commit is contained in:
parent
b850875840
commit
4ddb812354
|
@ -95,7 +95,6 @@ not_yet_fully_covered = {
|
|||
'zerver/lib/sqlalchemy_utils.py',
|
||||
'zerver/lib/str_utils.py',
|
||||
'zerver/lib/stream_recipient.py',
|
||||
'zerver/lib/subdomains.py',
|
||||
'zerver/lib/tex.py',
|
||||
'zerver/lib/timeout.py',
|
||||
'zerver/lib/unminify.py',
|
||||
|
|
|
@ -25,10 +25,8 @@ def is_subdomain_root_or_alias(request):
|
|||
return not subdomain or subdomain in settings.ROOT_SUBDOMAIN_ALIASES
|
||||
|
||||
def check_subdomain(realm_subdomain, user_subdomain):
|
||||
# type: (Optional[Text], Optional[Text]) -> bool
|
||||
# type: (Optional[Text], Text) -> bool
|
||||
if realm_subdomain is not None:
|
||||
if (realm_subdomain == "" and user_subdomain is None):
|
||||
return True
|
||||
if realm_subdomain != user_subdomain:
|
||||
return False
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue