From dd3e19284c2053e9da40ceef46afd2f4e132754a Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Sat, 29 Jun 2019 20:40:11 +0200 Subject: [PATCH] Fix case where multiple indexes with similar name seperated by ``_`` were interpreted as options. Fixes #78. --- CHANGES.rst | 4 ++++ src/Products/ZCatalog/query.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a114bded..f60b13b3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,10 @@ Changelog - Fix case where index value is changed to None after previously being indexed. (`#100 `_) +- Fix case where multiple indexes with similar name seperated by ``_`` were interpreted as options. + Fixes #78. + [thet] + 5.1 (2020-04-20) ---------------- diff --git a/src/Products/ZCatalog/query.py b/src/Products/ZCatalog/query.py index 87a7309c..e18836dd 100644 --- a/src/Products/ZCatalog/query.py +++ b/src/Products/ZCatalog/query.py @@ -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)