mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #28130 -- Fixed formset min_num validation with initial, unchanged forms.
Regression in f5c6295797.
This commit is contained in:
@@ -322,7 +322,8 @@ class BaseFormSet:
|
||||
return
|
||||
for i in range(0, self.total_form_count()):
|
||||
form = self.forms[i]
|
||||
if not form.has_changed():
|
||||
# Empty forms are unchanged forms beyond those with initial data.
|
||||
if not form.has_changed() and i >= self.initial_form_count():
|
||||
empty_forms_count += 1
|
||||
|
||||
self._errors.append(form.errors)
|
||||
|
||||
Reference in New Issue
Block a user