Skip to content

Commit

Permalink
Fix TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Apr 22, 2018
1 parent 2a21568 commit 0527e3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@ Changelog
4.2 (unreleased)
----------------

- Nothing changed yet.
- Fix a TypeError on Python 3 when trying to lookup in an OOBTree
a value for a key that has an invalid type


4.1 (2018-03-06)
Expand Down
6 changes: 5 additions & 1 deletion src/Products/PluginIndexes/unindex.py
Expand Up @@ -559,7 +559,11 @@ def query_index(self, record, resultset=None):
# other object. BTrees 4.0+ will throw a TypeError
# "object has default comparison".
continue
s = index.get(k, None)
try:
s = index.get(k, None)
except TypeError:
# key is not valid for this Btree so the value is None
s = None
# If None, try to bail early
if s is None:
if operator == 'or':
Expand Down

0 comments on commit 0527e3e

Please sign in to comment.