Code

Opened 6 years ago

Closed 6 years ago

#7160 closed (fixed)

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

Reported by: mwdiers <martin@…> Owned by: brosner
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:

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.

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from SVN to newforms-admin

comment:2 Changed 6 years ago by brosner

  • Owner changed from nobody to brosner
  • Status changed from new to assigned

Last one was me. I will look into this.

comment:3 Changed 6 years ago by brosner

  • Triage Stage changed from Unreviewed to Accepted

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 6 years ago by brosner

  • Resolution set to fixed
  • Status changed from assigned to closed

(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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.