Commit e87a8d4e authored by Łukasz Nowak's avatar Łukasz Nowak

- on this level it is possible to access objects which do not have getTypeIcon,

   as this is dynamically generated accessor, so fallback to reasonable default


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44999 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ce06c459
No related merge requests found
......@@ -1597,8 +1597,13 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
ti = self.getTypeInfo()
url = self.getPortalObject().portal_url()
if ti is None:
return '%s/misc_/OFSP/dtmldoc.gif' % url
return '%s/%s' % (url, ti.getTypeIcon())
icon = 'misc_/OFSP/dtmldoc.gif'
try:
icon = ti.getTypeIcon()
except AttributeError:
# do not fail in case of accessor is not available
pass
return '%s/%s' % (url, icon)
# We browse all used class from btree and hbtree and set not implemented
# class if one method defined on a class is not defined on other, thus if
......
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