# HG changeset patch # User Pierre-Yves David # Date 1307365258 -7200 # Node ID 84046395d2cdba606459032ec6985fc09c871644 # Parent 7e8182a635594fd08a8e22c9491509099b14e98d Fix name error introduced in c21d845836e4 c21d845836e4 use a ``vocab`` variable but doesn't define it. I assumed ``vocab`` is ``field.vocabulary(form)``. diff -r 7e8182a63559 -r 84046395d2cd 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: