Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2362 closed defect (fixed)

[patch] update_object is unable to update objects with OneToOneFields

Reported by: marcink@… Owned by: Jacob
Component: Generic views Version: master
Severity: normal Keywords:
Cc: marcink@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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.

Attachments (1)

diff_update_object_onetoonefield.txt (1.2 KB) - added by marcink@… 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by marcink@…

comment:1 Changed 10 years ago by anonymous

Cc: marcink@… added

comment:2 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [3849]) Fixed #2362 -- Corrected the way we retrieve an object so that it works for
one-to-one fields.

Note: See TracTickets for help on using tickets.
Back to Top