Django

Code

Ticket #6964 (closed: fixed)

Opened 4 months ago

Last modified 3 months ago

FileInput._has_changed not implemented

Reported by: brosner Assigned to: brosner
Milestone: Component: django.newforms
Version: newforms-admin Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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

6964_fileinput.diff (1.9 kB) - added by brosner on 04/04/08 15:29:31.
initial fix that needs some more thought

Change History

04/04/08 15:29:31 changed by brosner

  • attachment 6964_fileinput.diff added.

initial fix that needs some more thought

04/04/08 15:30:29 changed by brosner

  • status changed from new to assigned.
  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

04/28/08 23:32:00 changed by brosner

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #6964 (FileInput._has_changed not implemented)




Change Properties
Action