Inline formsets unique(_together) validation problems

34 views
Skip to first unread message

mrts

unread,
Sep 16, 2008, 7:14:52 AM9/16/08
to Django developers
A bug in 1.0 makes unique_together constraints fail at database level
(resulting in exceptions) instead of being caught at form validation
level.

The bug is detailed in
http://code.djangoproject.com/ticket/8882

I expect that the model validation implementation problems Honza has
are also related to this:
http://code.djangoproject.com/ticket/6845#comment:30

Another problem is the unique constraint -- if the inline formset
contains several forms with an colliding unique field that does not
yet exist in the db, validation fails as the uniqueness checks are
done before saving them in bulk (i.e. no validation in between the
individual forms).

Before I dig into this deeper, is someone already working on this or
does have an idea how to tackle this? Brosner?

alex....@gmail.com

unread,
Sep 16, 2008, 11:17:06 AM9/16/08
to Django developers
I'll take a look at this, the reason the second part didn't go in
originally(yeah, we thought of it), was that it was considered to be
in a different scope then the rest of the work on unique validation.

On Sep 16, 7:14 am, mrts <m...@mrts.pri.ee> wrote:
> A bug in 1.0 makes unique_together constraints fail at database level
> (resulting in exceptions) instead of being caught at form validation
> level.
>
> The bug is detailed inhttp://code.djangoproject.com/ticket/8882
Reply all
Reply to author
Forward
0 new messages