1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

Replaced an antiquated pattern.

Thanks Lennart Regebro for pointing it out.
This commit is contained in:
Aymeric Augustin
2013-05-17 16:33:36 +02:00
parent b1bfd9630e
commit 9c487b5974
30 changed files with 49 additions and 43 deletions

View File

@@ -119,7 +119,7 @@ class BaseFormSet(object):
return self.management_form.cleaned_data[INITIAL_FORM_COUNT]
else:
# Use the length of the initial data if it's there, 0 otherwise.
initial_forms = self.initial and len(self.initial) or 0
initial_forms = len(self.initial) if self.initial else 0
return initial_forms
def _construct_forms(self):