Commit 2590c5ab authored by Yoshinori Okuji's avatar Yoshinori Okuji

Fix a typo, and make it ignore exceptions when setting permissions.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@845 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 950d42cb
...@@ -215,8 +215,13 @@ class ModuleTemplateItem(Implicit): ...@@ -215,8 +215,13 @@ class ModuleTemplateItem(Implicit):
if self.module_id not in portal.objectIds(): # No renaming mapping for now if self.module_id not in portal.objectIds(): # No renaming mapping for now
module = portal.newContent(id=self.module_id, portal_type=self.module_type) module = portal.newContent(id=self.module_id, portal_type=self.module_type)
for name,role_list in self.module_permission_list: for name,role_list in self.module_permission_list:
aquire = (type(role_list) == type([])) acquire = (type(role_list) == type([]))
module.manage_permission(name, roles=role_list, aquire=aquire) try:
module.manage_permission(name, roles=role_list, acquire=acquire)
except:
# Normally, an exception is raised when you don't install any Product which
# has been in use when this business template is created.
pass
class BusinessTemplate(XMLObject): class BusinessTemplate(XMLObject):
""" """
......
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