#2362 closed defect (fixed)
[patch] update_object is unable to update objects with OneToOneFields
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Generic views | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | marcink@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | How to create a pull request | ||
Description ¶
The update_object generic view causes a ProgrammingError when trying to save an instance
of a model with a OneToOneField. The problem is caused by using object._meta.pk.name
instead of object._meta.pk.column, see the attached patch.
Change History (3)
by , 19 years ago
Attachment: | diff_update_object_onetoonefield.txt added |
---|
comment:1 by , 19 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [3849]) Fixed #2362 -- Corrected the way we retrieve an object so that it works for
one-to-one fields.