Opened 7 years ago

Closed 7 years ago

#15977 closed Bug (needsinfo)

ChoiceField breaks if value is None

Reported by: adam@… Owned by: nobody
Component: Forms Version: 1.3
Severity: Normal Keywords: form clean validate
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


If the value of a ChoiceField is None (ie. it was set programmatically from something other than an HTML request and that value was not entered) then this will throw a TypeError instead of creating a proper ValidationError. Perhaps change it to "{'value':value or 'None'}" to avoid this?

Change History (1)

comment:1 Changed 7 years ago by Claude Paroz

Resolution: needsinfo
Status: newclosed

Please provide at least a snippet of code to demonstrate the problem. It is not obvious when looking at the code.

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