mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +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):
|
def authenticate(self, username, password, realm_subdomain=None, return_data=None):
|
||||||
# type: (Text, str, Optional[Text], Optional[Dict[str, Any]]) -> Optional[UserProfile]
|
# type: (Text, str, Optional[Text], Optional[Dict[str, Any]]) -> Optional[UserProfile]
|
||||||
try:
|
try:
|
||||||
if settings.REALMS_HAVE_SUBDOMAINS:
|
if settings.REALMS_HAVE_SUBDOMAINS and realm_subdomain is not None:
|
||||||
self._realm = get_realm(realm_subdomain)
|
self._realm = get_realm(realm_subdomain)
|
||||||
else:
|
else:
|
||||||
self._realm = get_realm_by_email_domain(username)
|
self._realm = get_realm_by_email_domain(username)
|
||||||
|
|||||||
Reference in New Issue
Block a user