web/formfields.py
changeset 5955 67dfe437bf25
parent 5916 36206e846a27
child 6082 57933567146f
child 6114 3e1718a2db55
--- a/web/formfields.py	Fri Jul 09 12:48:03 2010 +0200
+++ b/web/formfields.py	Mon Jul 12 12:25:19 2010 +0200
@@ -411,7 +411,7 @@
             vocab = vocab_sort(vocab)
         # XXX pre 3.9 bw compat
         for i, (label, value) in enumerate(vocab):
-            if not isinstance(value, basestring):
+            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))