--- a/web/formfields.py Mon Sep 13 11:00:22 2010 +0200
+++ b/web/formfields.py Mon Sep 13 12:24:11 2010 +0200
@@ -410,11 +410,16 @@
if self.sort:
vocab = vocab_sort(vocab)
# XXX pre 3.9 bw compat
- for i, (label, value) in enumerate(vocab):
+ for i, option in enumerate(vocab):
+ # option may be a 2 or 3-uple (see Select widget _render method for
+ # explanation)
+ value = option[1]
if value is not None and not isinstance(value, basestring):
warn('[3.9] %s: vocabulary value should be an unicode string'
% self, DeprecationWarning)
- vocab[i] = (label, unicode(value))
+ option = list(option)
+ option[1] = unicode(value)
+ vocab[i] = option
return vocab
def format(self, form):