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 @@ ...@@ -71,11 +71,10 @@
if desc in (\'\', None):\n if desc in (\'\', None):\n
if field.getId().startswith(\'my_\'):\n if field.getId().startswith(\'my_\'):\n
properties = context.propertyMap()\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 for property in properties:\n
if \'_%s_\' % property[\'id\'] in id:\n if \'_%s_\' % property[\'id\'] in id: # To avoid matching "my_"\n
desc = property[\'description\']\n return property.get(\'description\', \'\')\n
break\n
\n \n
return desc\n return desc\n
</string> </value> </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