web/formwidgets.py
branchstable
changeset 7453 84046395d2cd
parent 7450 c21d845836e4
child 7879 9aae456abab5
--- 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: