Opened 9 years ago

Closed 9 years ago

#25410 closed Bug (fixed)

Empty ClearableFileInput raises ValueError

Reported by: vfigueiro Owned by: Tim Graham
Component: Forms Version: dev
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

Having an empty file field raises ValueError whenever the ClearableFileInput widget is rendered in the admin or in a custom form. It prevents the rendering of the form in change mode (works in creation mode).

I guess this started happening on Python 2.7 after #24727 was fixed in 5c412dd8a724b263489c1bd7a2fea381460665d7.

Related ticket: #13327

Attachments (1)

traceback.txt (6.0 KB ) - added by vfigueiro 9 years ago.

Download all attachments as: .zip

Change History (5)

by vfigueiro, 9 years ago

Attachment: traceback.txt added

comment:1 by Tim Graham, 9 years ago

Component: UncategorizedForms
Description: modified (diff)
Owner: changed from nobody to Tim Graham
Severity: NormalRelease blocker
Status: newassigned
Triage Stage: UnreviewedAccepted

Confirmed as a regression in 1.9. I'll revert the patch that caused the regression, reopen that ticket for more investigation, and add a test for this issue.

comment:2 by Tim Graham, 9 years ago

Has patch: set

comment:3 by Tim Graham, 9 years ago

Description: modified (diff)

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 7cb3a488:

Fixed #25410 -- Fixed empty ClearableFileInput crash on Python 2.

Reverted "Fixes #24727 -- Prevented ClearableFileInput from masking
exceptions on Python 2" and added a regression test.

This reverts commit 5c412dd8a724b263489c1bd7a2fea381460665d7.

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