Commit 9f8c3be9 authored by Romain Courteaud's avatar Romain Courteaud

Modified getLogicalPath for better display


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2174 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1563db7e
...@@ -158,7 +158,15 @@ class Category(Folder): ...@@ -158,7 +158,15 @@ class Category(Folder):
while not current is base : while not current is base :
objectlist.insert(0, current) objectlist.insert(0, current)
current = aq_parent(current) current = aq_parent(current)
return '/'.join([object.getTitle() for object in objectlist])
# it s better for the user to display something than only ''...
logical_title_list = []
for object in objectlist:
logical_title = object.getTitle()
if logical_title in [None, '']:
logical_title = object.getId()
logical_title_list.append(logical_title)
return '/'.join(logical_title_list)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getCategoryChildValueList') 'getCategoryChildValueList')
......
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