subdomains: Simplify a funny call site of get_subdomain.

The type of get_subdomain's parameter is non-Optional, and
in fact if passed an argument of None it would promptly
blow up.  So this `getattr` can't be serving any purpose.
This commit is contained in:
Greg Price
2017-10-19 17:41:12 -07:00
committed by Tim Abbott
parent f8f4d9cb63
commit f10e66eff2

View File

@@ -216,7 +216,7 @@ class ZulipPasswordResetForm(PasswordResetForm):
how we send all other mail in the codebase.
"""
user = get_user_profile_by_email(to_email)
attempted_subdomain = get_subdomain(getattr(self, 'request'))
attempted_subdomain = get_subdomain(self.request)
context['attempted_realm'] = False
if not check_subdomain(user.realm.subdomain, attempted_subdomain):
context['attempted_realm'] = get_realm(attempted_subdomain)