Fix name error introduced in c21d845836e4 stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 06 Jun 2011 15:00:58 +0200
branchstable
changeset 7453 84046395d2cd
parent 7452 7e8182a63559
child 7454 1090724f28ed
child 7465 bb0c89d1a078
Fix name error introduced in c21d845836e4 c21d845836e4 use a ``vocab`` variable but doesn't define it. I assumed ``vocab`` is ``field.vocabulary(form)``.
web/formwidgets.py
--- a/web/formwidgets.py	Mon Jun 06 15:00:05 2011 +0200
+++ b/web/formwidgets.py	Mon Jun 06 15:00:58 2011 +0200
@@ -445,7 +445,8 @@
         curvalues, attrs = self.values_and_attributes(form, field)
         options = []
         optgroup_opened = False
-        for option in field.vocabulary(form):
+        vocab = field.vocabulary(form)
+        for option in vocab:
             try:
                 label, value, oattrs = option
             except ValueError: