Skip to content

Commit

Permalink
do not change index_modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki committed Oct 29, 2019
1 parent 74149d8 commit 861b573
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collective/collectionfilter/vocabularies.py
Expand Up @@ -124,9 +124,9 @@ def groupby(self):
index_modifier = None
display_modifier = translate_value # Allow to translate in this package domain per default. # noqa
idx = cat._catalog.indexes.get(it)
if six.PY2 and getattr(idx, 'meta_type', '') == 'KeywordIndex':
if six.PY2 and getattr(idx, 'meta_type', None) == 'KeywordIndex':
# in Py2 KeywordIndex accepts only utf-8 encoded values.
index_modifier = lambda val: translate_value(safe_encode(val)) # noqa
index_modifier = safe_encode

if getattr(idx, 'meta_type', None) == 'BooleanIndex':
index_modifier = make_bool
Expand Down

0 comments on commit 861b573

Please sign in to comment.