Opened 14 years ago
Closed 14 years ago
#13952 closed (invalid)
r13363 brokes add model in admin for models with inheritance
Reported by: | krejcik | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | postgres sequence | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Appears for multi-table inheritance during save of new instance from admin.
Raised exception is:
IntegrityError at /admin/.../add/
null value in column "basefoo_ptr_id" violates not-null constraint
Change History (3)
comment:1 by , 14 years ago
comment:3 by , 14 years ago
Component: | django.contrib.admin → Database layer (models, ORM) |
---|---|
Keywords: | postgres sequence added |
milestone: | 1.3 |
Resolution: | → invalid |
Status: | new → closed |
Marking as invalid.
The problem wasn't in django it self. The r13362 introduced pg_get_serial_sequence().
When altering a column and asigning the sequence to it, you need to call "ALTER SEQUENCE name OWNED BY table.column;" in order to make pg_get_serial_sequence() work properly.
Note:
See TracTickets
for help on using tickets.
in r13962 works everything properly