Commit 2524f575 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Reset domain_list and report_list with None instead of (), because Selection...

Reset domain_list and report_list with None instead of (), because Selection can set default values with None automatically.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7302 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c619269
...@@ -165,7 +165,7 @@ class Selection(Acquisition.Implicit, Traversable, Persistent): ...@@ -165,7 +165,7 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
self.params[key] = params[key] self.params[key] = params[key]
if kw is not None: if kw is not None:
for k,v in kw.items(): for k,v in kw.items():
if k in ('domain', 'report', 'domain_path', 'report_path') or v is not None: if k in ('domain', 'report', 'domain_path', 'report_path', 'domain_list', 'report_list') or v is not None:
# XXX Because method_path is an URI, it must be in ASCII. # XXX Because method_path is an URI, it must be in ASCII.
# Shouldn't Zope automatically does this conversion? -yo # Shouldn't Zope automatically does this conversion? -yo
if k == 'method_path' and type(v) is type(u'a'): if k == 'method_path' and type(v) is type(u'a'):
......
...@@ -334,9 +334,9 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -334,9 +334,9 @@ class SelectionTool( UniqueObject, SimpleItem ):
if selection is not None: if selection is not None:
selection.edit(invert_mode=0, params={}, checked_uids=[]) selection.edit(invert_mode=0, params={}, checked_uids=[])
if reset_domain_tree: if reset_domain_tree:
selection.edit(domain=None, domain_path=None, domain_list=()) selection.edit(domain=None, domain_path=None, domain_list=None)
if reset_report_tree: if reset_report_tree:
selection.edit(report=None, report_path=None, report_list=()) selection.edit(report=None, report_path=None, report_list=None)
security.declareProtected(ERP5Permissions.View, 'setSelectionSortOrder') security.declareProtected(ERP5Permissions.View, 'setSelectionSortOrder')
def setSelectionSortOrder(self, selection_name, sort_on, REQUEST=None): def setSelectionSortOrder(self, selection_name, sort_on, REQUEST=None):
......
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