Opened 18 years ago

Closed 18 years ago

Last modified 18 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: 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

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@… 18 years ago.

Download all attachments as: .zip

Change History (3)

by marcink@…, 18 years ago

comment:1 by anonymous, 18 years ago

Cc: marcink@… added

comment:2 by Malcolm Tredinnick, 18 years ago

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