[web/views] Fix exception in CWProperty edit form (closes #5087412)
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 17 Mar 2015 12:35:45 +0100
changeset 10277 e7cdf820fe8f
parent 10272 3231fd2fa7a5
child 10278 90aab6ddf6d8
[web/views] Fix exception in CWProperty edit form (closes #5087412) Also add missing help message. The overall display is ugly, but at least the message is shown.
web/views/cwproperties.py
--- a/web/views/cwproperties.py	Wed Mar 18 14:41:47 2015 +0100
+++ b/web/views/cwproperties.py	Tue Mar 17 12:35:45 2015 +0100
@@ -302,7 +302,7 @@
         domid = field.dom_id(form)
         value = '<span class="value" id="%s">%s</span>' % (domid, self.value)
         if self.msg:
-            value + '<div class="helper">%s</div>' % self.msg
+            value += '<div class="helper">%s</div>' % self.msg
         return value
 
 
@@ -355,6 +355,7 @@
             msg = form._cw._('you should probably delete that property')
             self.widget = NotEditableWidget(entity.printable_value('value'),
                                             '%s (%s)' % (msg, ex))
+            return
         if entity.pkey.startswith('system.'):
             msg = form._cw._('value associated to this key is not editable '
                              'manually')