Commit 514ba220 authored by Vincent Pelletier's avatar Vincent Pelletier

Don't crash if there is no description defined in the property sheet.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6934 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c7f9b1c9
......@@ -71,11 +71,10 @@
if desc in (\'\', None):\n
if field.getId().startswith(\'my_\'):\n
properties = context.propertyMap()\n
id = \'%s_\' % field.getId()\n
id = \'%s_\' % field.getId() # To avoid matching a subword\n
for property in properties:\n
if \'_%s_\' % property[\'id\'] in id:\n
desc = property[\'description\']\n
break\n
if \'_%s_\' % property[\'id\'] in id: # To avoid matching "my_"\n
return property.get(\'description\', \'\')\n
\n
return desc\n
</string> </value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment