[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - vocabularywidget.py:1.25
Fred L. Drake, Jr.
fred@zope.com
Mon, 2 Jun 2003 15:13:32 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv24121
Modified Files:
vocabularywidget.py
Log Message:
fix test for missing input
=== Zope3/src/zope/app/browser/form/vocabularywidget.py 1.24 => 1.25 ===
--- Zope3/src/zope/app/browser/form/vocabularywidget.py:1.24 Mon Jun 2 14:16:26 2003
+++ Zope3/src/zope/app/browser/form/vocabularywidget.py Mon Jun 2 15:13:32 2003
@@ -199,7 +199,7 @@
data = self.context.query(self.context.context, self)
if data is self:
# not on the content object either
- if self.context.required:
+ if self.context.required and not optional:
raise MissingInputError(self.context.__name__,
self.title,
"required field not present")
@@ -223,7 +223,7 @@
data = self.context.query(self.context.context, self)
if data is self:
# not on the content object either
- if self.context.required:
+ if self.context.required and not optional:
raise MissingInputError(self.context.__name__,
self.title,
"required field not present")