From f8eab7366e26b6eac4373c98cc4c8748fc68f204 Mon Sep 17 00:00:00 2001 From: Andreas Gabriel Date: Fri, 20 May 2016 08:30:29 +0200 Subject: [PATCH] Fix if cached result is single integer value convert it to IISet --- src/Products/PluginIndexes/common/UnIndex.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Products/PluginIndexes/common/UnIndex.py b/src/Products/PluginIndexes/common/UnIndex.py index 9671af25..9610aa85 100644 --- a/src/Products/PluginIndexes/common/UnIndex.py +++ b/src/Products/PluginIndexes/common/UnIndex.py @@ -455,11 +455,13 @@ def _apply_index(self, request, resultset=None): cached = r if cached is not None: + if isinstance(cached, int): + cached = IISet((cached, )) + if not_parm: not_parm = map(self._convert, not_parm) exclude = self._apply_not(not_parm, resultset) - r = difference(cached, exclude) - return r, (self.id,) + cached = difference(cached, exclude) return cached, (self.id,)