[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - vocabularywidget.py:1.52

Garrett Smith garrett at mojave-corp.com
Wed Aug 13 20:44:59 EDT 2003


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

Modified Files:
	vocabularywidget.py 
Log Message:
Fixed an improper use of _missing in vocab widgets. These widgets need ftests.

=== Zope3/src/zope/app/browser/form/vocabularywidget.py 1.51 => 1.52 ===
--- Zope3/src/zope/app/browser/form/vocabularywidget.py:1.51	Wed Aug 13 17:27:50 2003
+++ Zope3/src/zope/app/browser/form/vocabularywidget.py	Wed Aug 13 19:44:54 2003
@@ -509,12 +509,12 @@
     def renderItems(self, value):
         vocabulary = self.context.vocabulary
         # check if we want to select first item
-        if (value == self._missing
+        if (value == self.context.missing_value
             and getattr(self.context, 'firstItem', False)
             and len(vocabulary) > 0):
             # Grab the first item from the iterator:
             values = [iter(vocabulary).next().value]
-        elif value != self._missing:
+        elif value != self.context.missing_value:
             values = [value]
         else:
             values = ()
@@ -537,7 +537,7 @@
     """Vocabulary-backed widget supporting multiple selections."""
 
     def renderItems(self, value):
-        if value == self._missing:
+        if value == self.context.missing_value:
             values = ()
         else:
             values = list(value)




More information about the Zope3-Checkins mailing list