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 issue #5331. #5332
Fix issue #5331. #5332
Conversation
lib/Models/CkanCatalogGroup.ts
Outdated
uri.addQuery(key, filterQuery[key]) | ||
); | ||
if (typeof filterQuery === "string") { | ||
uri.query(uri.query() + "&" + filterQuery.toString()); |
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.
Looks good @mwu2018
Sorry to nitpick, but is it possible to use uri.addQuery()
instead of uri.query(uri.query() + ...
?
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.
@nf-s You did not nitpick at all. Instead, you have opened a can of worms 😃
- The
filterQuery
trait is changed similar to what you suggested initially. Your later suggestion does not allow mixed elements in the array. - We can not use
uri.addQuery(filterQuery)
because the URI encoder will escape=
, which is not what we want. I have added some comments in the code. - The code is slightly refactored in order to do simple unit tests.
Can you please take another look?
What this PR does
Fixes #5331
Checklist