Commit c6f1e593 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Do not hide errors

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27110 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c1efbd0c
......@@ -50,7 +50,7 @@ class PortalTypeActionDocumentationHelper(DocumentationHelper):
"""
Returns the permissions of the documentation helper
"""
permissions = getattr(self.getDocumentedObject(), "permissions", [])
permissions = getattr(self.getDocumentedObject(), "permissions")
return ', '.join(x for x in permissions)
security.declareProtected(Permissions.AccessContentsInformation, 'getVisible')
......@@ -66,6 +66,6 @@ class PortalTypeActionDocumentationHelper(DocumentationHelper):
"""
Returns the category of the documentation helper
"""
return getattr(self.getDocumentedObject(), "category", '')
return getattr(self.getDocumentedObject(), "category")
InitializeClass(PortalTypeActionDocumentationHelper)
......@@ -130,7 +130,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
"""
Returns the list of allowed content type of the documentation helper
"""
return getattr(self.getDocumentedObject(), "allowed_content_types", [])
return getattr(self.getDocumentedObject(), "allowed_content_types")
security.declareProtected(Permissions.AccessContentsInformation, 'getAllowedContentTypeUriList')
def getAllowedContentTypeUriList(self):
......@@ -145,7 +145,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
"""
Returns the list of hidden content type of the documentation helper
"""
return getattr(self.getDocumentedObject(), "hidden_content_type_list", [])
return getattr(self.getDocumentedObject(), "hidden_content_type_list")
security.declareProtected(Permissions.AccessContentsInformation, 'getHiddenContentTypeUriList')
def getHiddenContentTypeUriList(self):
......@@ -160,14 +160,14 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
"""
Returns the list of base category of the documentation helper
"""
return getattr(self.getDocumentedObject(), "base_category_list", [])
return getattr(self.getDocumentedObject(), "base_category_list")
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquireLocalRoles')
def getAcquireLocalRoles(self):
"""
Returns the list of allowed content type for the documentation helper
"""
local_roles = getattr(self.getDocumentedObject(), "acquire_local_roles", '')
local_roles = getattr(self.getDocumentedObject(), "acquire_local_roles")
if local_roles:
return 'Yes'
else:
......@@ -196,14 +196,14 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
"""
Returns the list of groups for the documentation helper
"""
return getattr(self.getDocumentedObject(), "group_list", [])
return getattr(self.getDocumentedObject(), "group_list")
security.declareProtected(Permissions.AccessContentsInformation, 'getActionIdList')
def getActionIdList(self):
"""
"""
action_list = []
actions = getattr(self.getDocumentedObject(), "_actions", [])
actions = getattr(self.getDocumentedObject(), "_actions")
for action in actions:
action_list.append(action.getId())
return action_list
......@@ -233,7 +233,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
"""
"""
role_list = []
roles = getattr(self.getDocumentedObject(), "_roles", '')
roles = getattr(self.getDocumentedObject(), "_roles")
for role in roles:
role_list.append(role.Title())
return role_list
......
......@@ -50,13 +50,13 @@ class PortalTypeRoleDocumentationHelper(DocumentationHelper):
"""
Returns the list of categories for the role
"""
return getattr(self.getDocumentedObject(), "category", '')
return getattr(self.getDocumentedObject(), "category")
security.declareProtected(Permissions.AccessContentsInformation, 'getBaseCategoryScript')
def getBaseCategoryScript(self):
"""
Returns the base category script of the role
"""
return getattr(self.getDocumentedObject(), "base_category_script", '')
return getattr(self.getDocumentedObject(), "base_category_script")
InitializeClass(PortalTypeRoleDocumentationHelper)
......@@ -50,7 +50,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
"""
Returns the title of the documentation helper
"""
return getattr(self.getDocumentedObject(), "_params", '')
return getattr(self.getDocumentedObject(), "_params")
security.declareProtected(Permissions.AccessContentsInformation, 'getSourceCode')
def getSourceCode(self):
......@@ -58,7 +58,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
Returns the source code the script python
"""
from zLOG import LOG, INFO
source_code = getattr(self.getDocumentedObject(), "_body", '')
source_code = getattr(self.getDocumentedObject(), "_body")
portal_transforms = getattr(self, 'portal_transforms', None)
if portal_transforms is not None:
REQUEST = getattr(self, 'REQUEST', None)
......
......@@ -43,14 +43,14 @@ class SkinFolderItemDocumentationHelper(DocumentationHelper):
"""
Returns the type of the documentation helper
"""
return getattr(self.getDocumentedObject(), "meta_type", '')
return getattr(self.getDocumentedObject(), "meta_type")
security.declareProtected(Permissions.AccessContentsInformation, 'getContentType')
def getContentType(self):
"""
Returns the title of the documentation helper
"""
return getattr(self.getDocumentedObject(), "content_type", '')
return getattr(self.getDocumentedObject(), "content_type")
InitializeClass(SkinFolderItemDocumentationHelper)
......@@ -57,7 +57,7 @@ class WorkflowMethodDocumentationHelper(DocumentationHelper):
Returns the title of the documentation helper
"""
# XXX May return _doNothing
return getattr(self.getDocumentedObject(), "_transition_id", '')
return getattr(self.getDocumentedObject(), "_transition_id")
security.declareProtected(Permissions.AccessContentsInformation, 'getDefinition')
def getDefinition(self):
......
......@@ -51,7 +51,7 @@ class ZSQLMethodDocumentationHelper(DocumentationHelper):
Returns the source code of the documentation helper
"""
from zLOG import LOG, INFO
source_code = getattr(self.getDocumentedObject(), "src", '')
source_code = getattr(self.getDocumentedObject(), "src")
portal_transforms = getattr(self, 'portal_transforms', None)
if portal_transforms is not None:
REQUEST = getattr(self, 'REQUEST', None)
......@@ -72,34 +72,34 @@ class ZSQLMethodDocumentationHelper(DocumentationHelper):
"""
Returns the title of the documentation helper
"""
return getattr(self.getDocumentedObject(), "connection_id", '')
return getattr(self.getDocumentedObject(), "connection_id")
security.declareProtected(Permissions.AccessContentsInformation, 'getArgumentList')
def getArgumentList(self):
"""
Returns the arguments of the documentation helper
"""
return getattr(self.getDocumentedObject(), "arguments_src", [])
return getattr(self.getDocumentedObject(), "arguments_src")
security.declareProtected(Permissions.AccessContentsInformation, 'getClassName')
def getClassName(self):
"""
Returns the class name of the documentation helper
"""
return getattr(self.getDocumentedObject(), "class_name_", '')
return getattr(self.getDocumentedObject(), "class_name_")
security.declareProtected(Permissions.AccessContentsInformation, 'getClassFile')
def getClassFile(self):
"""
Returns the class file of the documentation helper
"""
return getattr(self.getDocumentedObject(), "class_file_", '')
return getattr(self.getDocumentedObject(), "class_file_")
security.declareProtected(Permissions.AccessContentsInformation, 'getMaxRows')
def getMaxRows(self):
"""
Returns the of the documentation helper
"""
return getattr(self.getDocumentedObject(), "max_rows_", '')
return getattr(self.getDocumentedObject(), "max_rows_")
InitializeClass(ZSQLMethodDocumentationHelper)
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