mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Simplifed formset iteration using enumerate().
This commit is contained in:
parent
2b56c56653
commit
b2717c7532
2 changed files with 5 additions and 10 deletions
|
@ -237,8 +237,7 @@ class BaseTestFormSet(BaseFormSet):
|
|||
return
|
||||
|
||||
emails = []
|
||||
for i in range(0, self.total_form_count()):
|
||||
form = self.forms[i]
|
||||
for form in self.forms:
|
||||
email = form.cleaned_data['email']
|
||||
if email in emails:
|
||||
raise ValidationError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue