[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
|
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.
(In [3849]) Fixed #2362 -- Corrected the way we retrieve an object so that it works for
one-to-one fields.