summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Wysocki <tomasz@pozytywnie.pl>2014-04-04 09:10:17 +0200
committerTim Graham <timograham@gmail.com>2014-04-07 08:30:05 -0400
commit78623d253b754effe61622dd3e49c266a5a85d5f (patch)
tree68892b71bf74ddbac5ea8f7fde6e9f4322bded20
parentcd914e31c9a889f18c50c15b4f6ee4959624001f (diff)
Removed casting to bool just before negation.
-rw-r--r--django/forms/forms.py2
-rw-r--r--django/forms/formsets.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index a0dcaab531..af7318255f 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -157,7 +157,7 @@ class BaseForm(object):
Returns True if the form has no errors. Otherwise, False. If errors are
being ignored, returns False.
"""
- return self.is_bound and not bool(self.errors)
+ return self.is_bound and not self.errors
def add_prefix(self, field_name):
"""
diff --git a/django/forms/formsets.py b/django/forms/formsets.py
index 9c4c7b5b9a..2309fa00bd 100644
--- a/django/forms/formsets.py
+++ b/django/forms/formsets.py
@@ -308,7 +308,7 @@ class BaseFormSet(object):
# should not cause the entire formset to be invalid.
continue
forms_valid &= form.is_valid()
- return forms_valid and not bool(self.non_form_errors())
+ return forms_valid and not self.non_form_errors()
def full_clean(self):
"""