Commit fac9d756 authored by Nicolas Delaby's avatar Nicolas Delaby

Check if portal_type_list is not empty

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17997 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 747dd81c
...@@ -511,7 +511,7 @@ def updateRoleMappings(self, REQUEST=None): ...@@ -511,7 +511,7 @@ def updateRoleMappings(self, REQUEST=None):
portal_type_list.append(tid) portal_type_list.append(tid)
elif include_default == 1: elif include_default == 1:
portal_type_list.append(tid) portal_type_list.append(tid)
if portal_type_list:
object_list = self.portal_catalog(portal_type=portal_type_list, limit=None) object_list = self.portal_catalog(portal_type=portal_type_list, limit=None)
object_list_len = len(object_list) object_list_len = len(object_list)
portal_activities = self.portal_activities portal_activities = self.portal_activities
...@@ -523,6 +523,8 @@ def updateRoleMappings(self, REQUEST=None): ...@@ -523,6 +523,8 @@ def updateRoleMappings(self, REQUEST=None):
.callMethodOnObjectList(current_path_list, .callMethodOnObjectList(current_path_list,
'updateRoleMappingsFor', 'updateRoleMappingsFor',
wf_id = self.getId()) wf_id = self.getId())
else:
object_list_len = 0
if REQUEST is not None: if REQUEST is not None:
return self.manage_properties(REQUEST, return self.manage_properties(REQUEST,
......
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