Opened 8 years ago

Closed 8 years ago

#6964 closed (fixed)

FileInput._has_changed not implemented

Reported by: brosner Owned by: brosner
Component: Forms Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


In working on tests for #6117 I have discovered that FileInput._has_changed which is the inherited method from Widget needs to be implemented. Right now it will force_unicode the dict from request.FILES and the initial data which is most likely a filepath in the database and attempt to compare equality. Fix this by more than likely just checking if data is None and return the opposite value. The only test case that needs some thinking is when data is not None or a non-empty dictionary.

Attachments (1)

6964_fileinput.diff (1.9 KB) - added by brosner 8 years ago.
initial fix that needs some more thought

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by brosner

initial fix that needs some more thought

comment:1 Changed 8 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 8 years ago by brosner

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

(In [7506]) newforms-admin: Fixed #6964 -- Implemented FileInput._has_changed. Before it was comparing the wrong values and causing it to trip up.

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