#7565 closed (fixed)
Fixture problem with child models
Reported by: | Owned by: | Malcolm Tredinnick | |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There seems to be a problem importing fixtures for child models. Supposing I have a model myapp.MyGroup that inherits from auth.Group, and I have a fixture that includes MyGroup data, I receive the following error:
psycopg2.ProgrammingError: column "id" does not exist at character 54
generated from this SQL:
SELECT setval('"myapp_mygroup_id_seq"', coalesce(max("id"), 1), max("id") IS NOT null) FROM "myapp_mygroup";
As far as I can tell, it appears that it is attempting to updating the sequence for the pk of the child model (for which there is none) using the "myapp.mygroup.id" column (which doesn't exist).
Change History (3)
comment:1 by , 17 years ago
Owner: | changed from | to
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [7789]) Fixed #7565 -- Fixed a problem with PostgreSQL sequence resetting in loaddata.