Commit dc93cbd3 authored by Nicolas Delaby's avatar Nicolas Delaby

We can not list keys if Memcached is used

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24268 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d869280c
...@@ -1283,12 +1283,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -1283,12 +1283,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
del(self._getPersistentContainer(user_id)[selection_name]) del(self._getPersistentContainer(user_id)[selection_name])
def _deleteGlobalSelectionFromContainer(self, selection_name): def _deleteGlobalSelectionFromContainer(self, selection_name):
id_list = [] if not self.isMemcachedUsed():
if self.isMemcachedUsed():
for k in self._getMemcachedContainer().keys():
if k.split('-')[1] == selection_name:
del(self._getMemcachedContainer()[k])
else:
if getattr(aq_base(self), 'selection_data', None) is not None: if getattr(aq_base(self), 'selection_data', None) is not None:
for user_id in self.selection_data.keys(): for user_id in self.selection_data.keys():
mapping = self._getPersistentContainer(user_id) mapping = self._getPersistentContainer(user_id)
......
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