mirror of https://github.com/django/django.git
Removed casting to bool just before negation.
This commit is contained in:
parent
cd914e31c9
commit
78623d253b
|
@ -157,7 +157,7 @@ class BaseForm(object):
|
||||||
Returns True if the form has no errors. Otherwise, False. If errors are
|
Returns True if the form has no errors. Otherwise, False. If errors are
|
||||||
being ignored, returns False.
|
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):
|
def add_prefix(self, field_name):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -308,7 +308,7 @@ class BaseFormSet(object):
|
||||||
# should not cause the entire formset to be invalid.
|
# should not cause the entire formset to be invalid.
|
||||||
continue
|
continue
|
||||||
forms_valid &= form.is_valid()
|
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):
|
def full_clean(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue