The listing:
{{{
>>> class BaseArticleFormSet(BaseFormSet):
... def clean(self):
... """Checks that no two articles have the same title."""
... if any(self.errors):
... # Don't bother validating the formset unless each form is
valid on its own
... return
}}}
This check is not complete, the full_clean method calls form.errors on all
forms in the formset at r349, even on forms that are to be removed. This
results in self.errors containing errors for forms that are to be deleted.
However, FormSet.is_valid ignores errors in forms that are to be removed.
The result is that the any(self.errors) snippet returns True, even if only
removed forms contain errors.
--
Ticket URL: <https://code.djangoproject.com/ticket/30940>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
* easy: 1 => 0
Comment:
Since f32d24652b920135eb6a0f3de74599f03e181731 forms that are to be
deleted **do not** have their errors appended to the formset's errors.
--
Ticket URL: <https://code.djangoproject.com/ticket/30940#comment:1>