Commit 16a5abe9 authored by Vincent Pelletier's avatar Vincent Pelletier

Don't fail when accessor is not available (really).

Also, don't try to fetch accessor when ti is None.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45275 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 54290174
...@@ -1594,15 +1594,15 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn, ...@@ -1594,15 +1594,15 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
Patched, as ERP5 Type does not provide getExprContext which is used in Patched, as ERP5 Type does not provide getExprContext which is used in
CMF 2.2 CMF 2.2
""" """
icon = 'misc_/OFSP/dtmldoc.gif'
ti = self.getTypeInfo() ti = self.getTypeInfo()
url = self.getPortalObject().portal_url() url = self.getPortalObject().portal_url()
if ti is None: if ti is not None:
icon = 'misc_/OFSP/dtmldoc.gif' try:
try: icon = ti.getTypeIcon()
icon = ti.getTypeIcon() except AttributeError:
except AttributeError: # do not fail in case of accessor is not available
# do not fail in case of accessor is not available pass
pass
return '%s/%s' % (url, icon) return '%s/%s' % (url, icon)
# We browse all used class from btree and hbtree and set not implemented # We browse all used class from btree and hbtree and set not implemented
......
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