Opened 17 years ago

Closed 17 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: no UI/UX: no

Description

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 by anonymous, 17 years ago

Version: SVNnewforms-admin

comment:2 by Brian Rosner, 17 years ago

Owner: changed from nobody to Brian Rosner
Status: newassigned

Last one was me. I will look into this.

comment:3 by Brian Rosner, 17 years ago

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 by Brian Rosner, 17 years ago

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