Commit 098887b8 authored by Nicolas Delaby's avatar Nicolas Delaby

Get storage and stats on selection without acquisition context

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17175 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 31201f13
......@@ -116,7 +116,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
def getStorage(self, default=None):
if default is None:
default = self.storage_list[0]
storage = getattr(self, 'storage', default)
storage = getattr(aq_base(self), 'storage', default)
if storage is not default and storage not in self.storage_list:
storage = self.storage_list[0]
return storage
......@@ -495,7 +495,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
default_stats = [' '] * 6
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None:
return getattr(selection, 'stats', default_stats)
return getattr(aq_base(selection), 'stats', default_stats)
return default_stats
......
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