Skip to content

Commit

Permalink
Fix case where multiple indexes with similar name seperated by _
Browse files Browse the repository at this point in the history
…were interpreted as options.

Fixes #78.
  • Loading branch information
thet committed Jun 19, 2020
1 parent bf97828 commit dd3e192
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Changelog
- Fix case where index value is changed to None after previously being indexed.
(`#100 <https://github.com/zopefoundation/Products.ZCatalog/issues/100>`_)

- Fix case where multiple indexes with similar name seperated by ``_`` were interpreted as options.
Fixes #78.
[thet]


5.1 (2020-04-20)
----------------
Expand Down
4 changes: 2 additions & 2 deletions src/Products/ZCatalog/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def __init__(self, request, iid, options=(), operators=('or', 'and'),
for field in request.keys():
if field.startswith(iid + '_'):
iid_tmp, op = field.split('_')

self.set(op, request[field])
if op in self.options:
self.set(op, request[field])

self.keys = keys
not_value = getattr(self, 'not', None)
Expand Down

0 comments on commit dd3e192

Please sign in to comment.