Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix case where multiple indexes with similar name seperated by _ were interpreted as options. #79

Merged
merged 9 commits into from
Jan 27, 2021
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Fixes
- 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