mirror of
https://github.com/zulip/zulip.git
synced 2026-06-21 21:32:29 +08:00
social auth: Replace a bit of explicit model-querying with get_realm.
This commit is contained in:
parent
093bae4bc5
commit
30cc2994de
@ -237,11 +237,9 @@ class SocialAuthMixin(ZulipAuthMixin):
|
||||
invalid_subdomain=bool(invalid_subdomain),
|
||||
mobile_flow_otp=mobile_flow_otp,
|
||||
is_signup=is_signup)
|
||||
try:
|
||||
realm = Realm.objects.get(string_id=subdomain)
|
||||
except Realm.DoesNotExist:
|
||||
realm = get_realm(subdomain)
|
||||
if realm is None:
|
||||
return redirect_to_subdomain_login_url()
|
||||
|
||||
return redirect_and_log_into_subdomain(realm, full_name, email_address,
|
||||
is_signup=is_signup)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user