#30977: Moved site variables assignment outside of the loop in
contrib.auth.forms.PasswordResetForm.save()
------------------------------------------+------------------------
Reporter: Hasan Ramezani | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------+------------------------
There is a code block for assigning the site variables in
`contrib.auth.forms.PasswordResetForm.save()`
{{{
for user in self.get_users(email):
if not domain_override:
current_site = get_current_site(request)
site_name = current_site.name
domain = current_site.domain
else:
site_name = domain = domain_override
}}}
It would be better to move this block outside because of `user` is not
used in this block.
--
Ticket URL: <https://code.djangoproject.com/ticket/30977>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.401a145411c0cb7164466095ffe388d6%40djangoproject.com.