Manipulator references related object through wrong attribute name
|Reported by:||ep||Owned by:||nobody|
|Severity:||Keywords:||model manipulator related|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.