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 29, 2019
1 parent 9abf1fe commit 145594b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ Changelog
5.1 (unreleased)
----------------

- Nothing changed yet.
Bug fixes
+++++++++

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


5.0.1 (2019-06-17)
Expand All @@ -13,7 +18,7 @@ Changelog
Bug fixes
+++++++++

- Fix sorting of index overview table in ZMI. Migrated the template from
- Fix sorting of index overview table in ZMI. Migrated the template from
to zpt.
(`#62 <https://github.com/zopefoundation/Products.ZCatalog/issues/62>`_)

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 145594b

Please sign in to comment.