Opened 17 years ago

Closed 17 years ago

#6504 closed (wontfix)

Manipulator references related object through wrong attribute name

Reported by: ep Owned by: nobody
Component: Core (Other) Version: dev
Severity: Keywords: model manipulator related
Cc: ep@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It appears that the save() method of the ManipulatorDescriptor, indjango/db/models/manipulators.py, is trying to access the instance's fields using the DB column names in lieu of the attribute name. This should work fine, until you use custom DB column names; then they become different, of course.

I discovered this while saving a changed object in an edit_inline model, on its "parent"'s admin form.

I hope I'm not getting this wrong – there is a chance I misunderstand the inner workings of Django and my own code is causing the breakage

Patch included; it's a one-liner.

Attachments (1)

attname-patch.diff (700 bytes ) - added by ep 17 years ago.
Patch that apparently fixes this issue.

Download all attachments as: .zip

Change History (2)

by ep, 17 years ago

Attachment: attname-patch.diff added

Patch that apparently fixes this issue.

comment:1 by James Bennett, 17 years ago

Resolution: wontfix
Status: newclosed

The manipulator system is deprecated.

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