take care to None labels
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 27 Jul 2009 18:41:44 +0200
changeset 2521 782360fa6cc0
parent 2520 8c5cf48ae9ea
child 2522 562f5dcf2345
take care to None labels
web/views/formrenderers.py
--- a/web/views/formrenderers.py	Mon Jul 27 18:41:29 2009 +0200
+++ b/web/views/formrenderers.py	Mon Jul 27 18:41:44 2009 +0200
@@ -85,6 +85,8 @@
         return '\n'.join(data)
 
     def render_label(self, form, field):
+        if field.label is None:
+            return u''
         label = self.req._(field.label)
         attrs = {'for': form.context[field]['id']}
         if field.required: