call super class if choices specified to get std behaviour stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 17 Dec 2009 17:22:36 +0100
branchstable
changeset 4131 d8ca873142f4
parent 4130 9560ff49b2db
child 4132 440d383367eb
call super class if choices specified to get std behaviour
web/formfields.py
--- a/web/formfields.py	Thu Dec 17 16:18:36 2009 +0100
+++ b/web/formfields.py	Thu Dec 17 17:22:36 2009 +0100
@@ -414,7 +414,7 @@
 
     def vocabulary(self, form):
         if self.choices:
-            return self.choices
+            return super(BooleanField, self).vocabulary(form)
         return [(form.req._('yes'), '1'), (form.req._('no'), '')]