Opened 8 years ago

Closed 8 years ago

#7160 closed (fixed)

MultiWidget does not detect changed values on an Inline - newforms-admin

Reported by: mwdiers <martin@…> Owned by: Brian Rosner
Component: contrib.admin Version: newforms-admin
Severity: Keywords: newforms-admin multiwidget inline
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Initial values saved via a MultiWidget in an Inline form in the admine, are saved properly. Subsequent changes to an existing record are not saved. I discovered this with my own MultiWidget, but tested it with a SplitDateTimeField as well.

To reproduce, place a DateTimeField into any Inline model. Save a new record. Works. Change that record. Doesn't work.

Change History (4)

comment:1 Changed 8 years ago by anonymous

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Version: SVNnewforms-admin

comment:2 Changed 8 years ago by Brian Rosner

Owner: changed from nobody to Brian Rosner
Status: newassigned

Last one was me. I will look into this.

comment:3 Changed 8 years ago by Brian Rosner

Triage Stage: UnreviewedAccepted

I've narrowed this down to a problem in the MultiWidget._has_changed method. Poor test coverage didn't catch this error. Will have this fixed shortly.

comment:4 Changed 8 years ago by Brian Rosner

Resolution: fixed
Status: assignedclosed

(In [7517]) newforms-admin: Fixed #7160 -- MultiWidget._has_changed was short-circuiting while testing for changed data in its widgets. Added tests to ensure this won't get broken in the future.

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