diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-08-21 07:02:03 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-08-21 10:02:03 -0400 |
| commit | ef87b38ef7b07a5a9b4ee424a04a9811836dee39 (patch) | |
| tree | f03c961e0dc702bb97cec2e92ecb520e9f20f3c0 /django | |
| parent | cdc6da395aa602d772bd376513121fb2b674bda1 (diff) | |
Fixed #29696 -- Prevented BaseModelFormSet.initial_form_count()'s from treating data={} as unbound.
Diffstat (limited to 'django')
| -rw-r--r-- | django/forms/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/models.py b/django/forms/models.py index aa35ef5f92..7648d97da4 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -570,7 +570,7 @@ class BaseModelFormSet(BaseFormSet): def initial_form_count(self): """Return the number of forms that are required in this FormSet.""" - if not (self.data or self.files): + if not self.is_bound: return len(self.get_queryset()) return super().initial_form_count() |
