Skip to content
Browse files

Removed casting to bool just before negation.

  • Loading branch information...
1 parent cd914e3 commit 78623d253b754effe61622dd3e49c266a5a85d5f @tomwys tomwys committed with timgraham
Showing with 2 additions and 2 deletions.
  1. +1 −1 django/forms/forms.py
  2. +1 −1 django/forms/formsets.py
View
2 django/forms/forms.py
@@ -157,7 +157,7 @@ def is_valid(self):
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):
"""
View
2 django/forms/formsets.py
@@ -308,7 +308,7 @@ def is_valid(self):
# 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):
"""

0 comments on commit 78623d2

Please sign in to comment.
Something went wrong with that request. Please try again.