Commit fb15aaa0 authored by Jérome Perrin's avatar Jérome Perrin

don't fail if the base category is invalid

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25273 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3175702a
......@@ -88,9 +88,12 @@ for item in item_list:\n
sub_field_dict[item_key][\'value\'] =\\\n
sub_field_dict[item_key][\'value\'] + [item_value]\n
\n
base_category_value = resolveCategory(base_category)\n
if base_category_value is not None:\n
sub_field_dict[item_key][\'title\'] = base_category_value.getTranslatedTitle()\n
else:\n
sub_field_dict[item_key][\'title\'] = base_category\n
\n
sub_field_dict[item_key][\'title\'] = resolveCategory(base_category).getTranslatedTitle()\n
\n
return sub_field_dict.values()\n
</string> </value>
</item>
......@@ -149,6 +152,8 @@ return sub_field_dict.values()\n
<string>base_category</string>
<string>sub_field_property_dict</string>
<string>_write_</string>
<string>base_category_value</string>
<string>None</string>
</tuple>
</value>
</item>
......
197
\ No newline at end of file
199
\ No newline at end of file
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