mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user