Commit 0626089c authored by Sebastien Robin's avatar Sebastien Robin

never give empty list as default parameter of methods

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19650 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 16698b21
......@@ -122,7 +122,7 @@ class RuleTool (UniqueObject, Folder):
security.declareProtected(Permissions.AccessContentsInformation,
'searchRuleList')
def searchRuleList(self, movement, tested_base_category_list=[], **kw):
def searchRuleList(self, movement, tested_base_category_list=None, **kw):
"""
this method searches for rules, as predicates against movement
......@@ -132,6 +132,9 @@ class RuleTool (UniqueObject, Folder):
"""
domain_tool = getToolByName(self, "portal_domains")
if tested_base_category_list is None:
tested_base_category_list = []
rule_list = domain_tool.searchPredicateList(context=movement,
tested_base_category_list=tested_base_category_list,
portal_type=self.getPortalRuleTypeList(),
......
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