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
Query with invalid paramter should raise an error #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea. As it changes the behaviour I'd suggest to bump the version to the next major one (in CHANGES.rst and setup.py) and add a description of the issue and the solution to the change log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the error comes from the user, I would prefer ValueError
over RuntimeError
.
Putting the test into a new options
property causes code duplication: the access logic is now both in __init__
as well as options
. I suggest to put the test into the set
method - and make options
a passive attribute (rather than an active property).
Line 109 could be slightly simpified: = value
instead of = value.lower()
(value
has been lowered a few lines before).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy.
71adae1
to
ad9e429
Compare
@icemac I have created an entry in the change log. I don't have any practice in code management for the community. Therefore I ask you to do the next steps as soon as the right time is reached. |
@andbag Thank you for fixing this issue. Should I cut a release now or are you planning other fixes which should go into the next release? |
Parameters can be used for a query that are not supported by the indexes. The user does not receive a feedback about the invalid used parameters. Results of a query could therefore misinterpreted. This behavior has already been identified
Products.ZCatalog/src/Products/PluginIndexes/FieldIndex/tests.py
Lines 258 to 259 in dd30d44