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

Do not validate unknown filters #100

Merged
merged 3 commits into from
Apr 6, 2021
Merged

Do not validate unknown filters #100

merged 3 commits into from
Apr 6, 2021

Conversation

schlick
Copy link
Member

@schlick schlick commented Mar 25, 2021

Currently all filter params in the query are validated against the filters available on the page. If you reference an unknown filter, the entire query is dropped and you get no filters at all. This PR changes that behaviour so that unknown filters are now no longer validated and are merely ignored.

@andrba
Copy link
Contributor

andrba commented Mar 25, 2021

It would be good to display a warning that some of the filters have been removed. This is to prevent users from blindly relying on bookmarked urls and expecting correct results when in fact the results could be different because some of the filters are no longer available on the page.

@schlick
Copy link
Member Author

schlick commented Mar 25, 2021

@andrba It shouldn't affect them. Any bookmarked urls that include an unknown filter currently wipe the query params resulting in no filters being applied and hence unfiltered results. This change allows unknown filters to be ignored so that a request with all valid filters can be applied. This PR does not change the behaviour where there is an invalid filter in the params. It will still wipe the query params and return unfiltered results.

@schlick schlick merged commit 402b3ae into develop Apr 6, 2021
@schlick schlick deleted the NEP-10395 branch April 6, 2021 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants