Revert "mypy: Ensure realm_subdomain is not None in LDAP authenticate()."

I was too hasty in pushing this -- it looks right logically, but it
breaks a test.  May not be hard to fix forward, but reverting now to
unbreak the build in master.

This reverts commit 02acd467b4.
This commit is contained in:
Greg Price
2017-08-09 20:12:27 -07:00
parent 41f395caf1
commit 9cb9e0d687

View File

@@ -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 and realm_subdomain is not None:
if settings.REALMS_HAVE_SUBDOMAINS:
self._realm = get_realm(realm_subdomain)
else:
self._realm = get_realm_by_email_domain(username)