[Zope3-dev] bug setting value to None via edit form
Garrett Smith
garrett@mojave-corp.com
Mon, 14 Jul 2003 15:30:04 -0500
Independent of the field.missing_value issue, I still think the
following code (in utility.py, line 174):
if value is not None and (force or not widget.haveData()):
widget.setData(value)
needs to be:
if force or not widget.haveData():
widget.setData(value)
The filter "value is not None" is bad, since None is a legal value to
pass to the widget.
This bug shows up when you delete an integer (i.e. Int field) value in
an HTML form -- the value in the field is updated, but the form is
displayed with the old value...because of that improper check for None.
-- Garrett