Skip to content

Commit

Permalink
Check if key is in the catalog indexes, for mapSortableIndexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Sep 18, 2015
1 parent c167af5 commit 1e84811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plone/app/querystring/registryreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e84811

Please sign in to comment.