From 1e84811f821615a9dc00e2fe608f80951769054a Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Fri, 18 Sep 2015 22:09:46 +0200 Subject: [PATCH] Check if key is in the catalog indexes, for mapSortableIndexes. --- plone/app/querystring/registryreader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plone/app/querystring/registryreader.py b/plone/app/querystring/registryreader.py index 3a49c28..4db677e 100644 --- a/plone/app/querystring/registryreader.py +++ b/plone/app/querystring/registryreader.py @@ -108,7 +108,7 @@ def mapSortableIndexes(self, values): catalog = getToolByName(getSite(), 'portal_catalog')._catalog sortables = {} for key, field in values.get('%s.field' % self.prefix).iteritems(): - if field['sortable'] and \ + if field['sortable'] and key in catalog.indexes and \ not IZCTextIndex.providedBy(catalog.getIndex(key)): sortables[key] = values.get('%s.field.%s' % (self.prefix, key)) values['sortable'] = sortables