Fixed #30977 -- Optimized PasswordResetForm.save() a bit.
Moved site variables assignment outside of the loop.
This commit is contained in:
parent
4cb15450ad
commit
4cec3cc82a
|
@ -286,13 +286,13 @@ class PasswordResetForm(forms.Form):
|
||||||
user.
|
user.
|
||||||
"""
|
"""
|
||||||
email = self.cleaned_data["email"]
|
email = self.cleaned_data["email"]
|
||||||
for user in self.get_users(email):
|
|
||||||
if not domain_override:
|
if not domain_override:
|
||||||
current_site = get_current_site(request)
|
current_site = get_current_site(request)
|
||||||
site_name = current_site.name
|
site_name = current_site.name
|
||||||
domain = current_site.domain
|
domain = current_site.domain
|
||||||
else:
|
else:
|
||||||
site_name = domain = domain_override
|
site_name = domain = domain_override
|
||||||
|
for user in self.get_users(email):
|
||||||
context = {
|
context = {
|
||||||
'email': email,
|
'email': email,
|
||||||
'domain': domain,
|
'domain': domain,
|
||||||
|
|
Loading…
Reference in New Issue