mirror of
https://github.com/Hopiu/django.git
synced 2026-04-27 10:14:48 +00:00
Removed casting to bool just before negation.
This commit is contained in:
parent
cd914e31c9
commit
78623d253b
2 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue