Opened 7 years ago

Closed 7 years ago

#6504 closed (wontfix)

Manipulator references related object through wrong attribute name

Reported by: ep Owned by: nobody
Component: Core (Other) Version: master
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: UI/UX:

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 7 years ago.
Patch that apparently fixes this issue.

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by ep

Patch that apparently fixes this issue.

comment:1 Changed 7 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

The manipulator system is deprecated.

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