Opened 10 years ago

Closed 10 years ago

#6964 closed (fixed)

FileInput._has_changed not implemented

Reported by: Brian Rosner Owned by: Brian Rosner
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 Brian Rosner 10 years ago.
initial fix that needs some more thought

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Brian Rosner

Attachment: 6964_fileinput.diff added

initial fix that needs some more thought

comment:1 Changed 10 years ago by Brian Rosner

Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 Changed 10 years ago by Brian Rosner

Resolution: fixed
Status: assignedclosed

(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