-
Notifications
You must be signed in to change notification settings - Fork 192
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: REST API treat 'false' as False #5573
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.
Thanks for fixing this long-standing issue @eimrek !
I'm not familiar with pyparsing
- would you mind adding a test that demonstrates your fix solves the issue?
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.
@eimrek thanks! A minor request, probably better to look into how this parsed attribute is used in resource.py::Node.get()
method.
Ok, i added a separate test for lowercase |
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.
@eimrek thanks, one minor request.
Co-authored-by: Jusong Yu <jusong.yeu@gmail.com>
for more information, see https://pre-commit.ci
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.
Thanks!
fixes #3635 The parser function that we use to parse the query string doesn't parse booleans as expected. When passing `false` in URL it will pared as `True` which is not correct. This PR fixes it by comparing the `true` or `false` attribute in url directly with the string `'true'` and return bool type. Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Cherry-pick: 7772adc
fixes #3635