[Zope3-dev] bug setting value to None via edit form
Steve Alexander
steve@cat-box.net
Sun, 13 Jul 2003 00:19:13 +0300
> The value passed to setUpWidget is already converted to its Python form
> at this point. So, in my example, IntWidget already converted the empty
> string in the HTTP form to None.
>
> Having read over Martijn's use cases, I don't think field's have
> 'missing_value' attributes
Right. They don't yet. They should be made to do so.
> -- an attribute that's missing has a None value,
Yes. And this doesn't work when None is a legitimate value for your
attribute.
> or isn't present.
No.
> The 'missing' discussion applied to HTTP attributes to Python mappings.
Yes, but that's not all there is. There is an important implication for
being able to correctly represent missing values in a browser.
However, the more fundamental issue is hardcoding that None means
"missing" whereas it is often convenient or necessary to use a different
value for "missing".
--
Steve Alexander