mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
mypy: Ensure realm_subdomain is not None in LDAP authenticate().
This commit is contained in:
committed by
Greg Price
parent
a6bb8f552b
commit
02acd467b4
@@ -414,7 +414,7 @@ class ZulipLDAPAuthBackend(ZulipLDAPAuthBackendBase):
|
||||
def authenticate(self, username, password, realm_subdomain=None, return_data=None):
|
||||
# type: (Text, str, Optional[Text], Optional[Dict[str, Any]]) -> Optional[UserProfile]
|
||||
try:
|
||||
if settings.REALMS_HAVE_SUBDOMAINS:
|
||||
if settings.REALMS_HAVE_SUBDOMAINS and realm_subdomain is not None:
|
||||
self._realm = get_realm(realm_subdomain)
|
||||
else:
|
||||
self._realm = get_realm_by_email_domain(username)
|
||||
|
Reference in New Issue
Block a user