On Thu, Dec 11, 2008 at 10:45 AM, Ana <[EMAIL PROTECTED]> wrote:

>
> [snip]
> My admin form - publication shows more than one pathology on the edit
> page, which means the above code works up to this point.  It also
> gives me 3 empty fields that allows me to continue to add pathologies
> to the publication.  When I add a new pathology and then save I
> receive the following error:
>
> duplicate key value violates unique constraint
> "fsafety_pathpubcombo_pkey"
>
> Can anyone please help?  This is the first python code I've written.
>

I do not have time to look in any detail at your models, etc. but I can say
that there have been problems like this with inlines and Postgres due to
models without any ordering specified coming back in different orders for
different calls (e.g. different when the form is submitted vs. when it was
first created).  A workaround is to specify an ordering for your models, so
you could try that and see if that avoids the problem for your case.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to