[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - widget.py:1.12

Steve Alexander steve@cat-box.net
Thu, 6 Feb 2003 14:59:51 -0500


Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv20363/src/zope/app/browser/form

Modified Files:
	widget.py 
Log Message:
fixed boolean logic error

I think I introduce this a while ago :-(

There should be a test for this.


=== Zope3/src/zope/app/browser/form/widget.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/browser/form/widget.py:1.11	Thu Feb  6 14:23:15 2003
+++ Zope3/src/zope/app/browser/form/widget.py	Thu Feb  6 14:59:50 2003
@@ -59,7 +59,7 @@
             return field.default
 
         value = self._convert(value)
-        if value is not None or not optional:
+        if value is not None and not optional:
 
             try:
                 field.validate(value)