Opened 18 years ago
Closed 18 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)
Change History (2)
by , 18 years ago
| Attachment: | attname-patch.diff added |
|---|
comment:1 by , 18 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
The manipulator system is deprecated.
Patch that apparently fixes this issue.