I'm using Django, and every once in a while I get this error:
IntegrityError: duplicate key value violates unique constraint "myapp_mymodel_pkey" DETAIL: Key (id)=(1) already exists.
My database does in fact have a
myapp_mymodel object with the primary key of
Why would Postgres attempt to use that primary key again? Or, is this most likely my application (or Django's ORM) causing this?
Note: I'm using Postgres.