mirror of https://github.com/zulip/zulip.git
login: Fix unnecessary queries on /login/ in development.
This block of code with 2 database queries is solely for the /devlogin endpoint. Removing that block from the /login code path makes it easier to test /login perf in development.
This commit is contained in:
parent
0a7b6909b9
commit
f270e354b1
|
@ -678,7 +678,7 @@ def login_page(request: HttpRequest, **kwargs: Any) -> HttpResponse:
|
|||
return redirect_to_deactivation_notice()
|
||||
|
||||
extra_context = kwargs.pop('extra_context', {})
|
||||
if dev_auth_enabled():
|
||||
if dev_auth_enabled() and kwargs.get("template_name") == "zerver/dev_login.html":
|
||||
if 'new_realm' in request.POST:
|
||||
realm = get_realm(request.POST['new_realm'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue