Commit 4ddb42ce authored by Jean-Paul Smets's avatar Jean-Paul Smets

Use accessors

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27111 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6f1e593
......@@ -131,7 +131,7 @@ class DocumentationHelper(Implicit):
"""
Returns the id of the documentation helper
"""
return getattr(aq_base(self.getDocumentedObject()), 'id', '')
return getattr(aq_base(self.getDocumentedObject()), 'id')
security.declareProtected(Permissions.AccessContentsInformation, 'getTempInstance')
def getTempInstance(self, portal_type):
......@@ -222,7 +222,10 @@ class DocumentationHelper(Implicit):
Returns the title of the documentation helper
(ex. class name)
"""
return getattr(aq_base(self.getDocumentedObject()), 'title', '')
try:
return self.getDocumentedObject().getTitle()
except AttributeError:
return getattr(self.getDocumentedObject(), 'title', '')
def getType(self):
"""
......@@ -236,7 +239,10 @@ class DocumentationHelper(Implicit):
"""
Returns the title of the documentation helper
"""
return getattr(aq_base(self.getDocumentedObject()), 'description', '')
try:
return self.getDocumentedObject().getDescription()
except AttributeError:
return getattr(self.getDocumentedObject(), 'description', '')
def getSectionUriList(self, id, **kw):
return getattr(self, 'get%sUriList' % convertToUpperCase(id))()
......
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