Commit c9161eeb authored by Alexandre Boeglin's avatar Alexandre Boeglin

* do not expect getTranslatedTitle to be always present

* return id if title is not defined

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18001 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b6159f46
......@@ -210,9 +210,12 @@ for name in relative:\n
obj = obj[name]\n
now.append(name)\n
if module:\n
title = obj.getTranslatedTitle()\n
try:\n
title = obj.getTranslatedTitleOrId()\n
except AttributeError:\n
title = obj.Title()\n
else:\n
title = obj.getTitle()\n
title = obj.Title()\n
if not name == \'talkback\':\n
result.append( { \'id\' : name\n
, \'title\' : title\n
......@@ -296,6 +299,7 @@ return result\n
<string>name</string>
<string>_getitem_</string>
<string>title</string>
<string>AttributeError</string>
<string>False</string>
</tuple>
</value>
......
450
\ No newline at end of file
452
\ 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