summaryrefslogtreecommitdiff
path: root/django/forms/formsets.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-05-17 16:33:36 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-05-17 18:08:58 +0200
commit9c487b5974ee7e7f196079611d7352364e8873ed (patch)
treeefc6ffa38da07b4302e145c33047cf2c41da105a /django/forms/formsets.py
parentb1bfd9630ef049070b0cd6ae215470d3d1facd40 (diff)
Replaced an antiquated pattern.
Thanks Lennart Regebro for pointing it out.
Diffstat (limited to 'django/forms/formsets.py')
-rw-r--r--django/forms/formsets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/formsets.py b/django/forms/formsets.py
index 2bd11d9f53..d421770093 100644
--- a/django/forms/formsets.py
+++ b/django/forms/formsets.py
@@ -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):