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

Support string list filters #69

Merged
merged 3 commits into from
Nov 9, 2021

Conversation

stevelacey
Copy link
Contributor

@stevelacey stevelacey commented Nov 8, 2021

What's this PR do?

Swaps out the bundle validation of query params in favor of letting django/url_filter deal with it, and adds support for AND's via passing multiple of the same key i.e. ?skill=1&skill=2 ala talent search v1.

Note: this switches ?skill=1&skill=2 from performing an OR to performing an AND. To perform an in query pass ?skill__in=1&skill_in=2 or the shorthand of ?skill__in=1,2. As far as I can see staff job search is the only thing doing this, and in the case of skills an and is probably what is wanted anyway.

Where should the reviewer start?

List api filters.

Why is this important, or what issue does this solve?

Logical ands were not possible and we only supported lists of integers.

What Worf gif best describes this PR or how it makes you feel?

worf-star-trek

Definition of Done:

  • This PR increases test coverage
  • This PR includes README updates reflecting any new features/improvements to the framework

@stevelacey stevelacey force-pushed the improvement/support-string-list-filters branch from 0f59997 to d827544 Compare November 8, 2021 14:37
@stevelacey stevelacey changed the title Support non-integer list filters Support string list filters Nov 8, 2021
@stevelacey stevelacey marked this pull request as draft November 8, 2021 15:16
@stevelacey stevelacey force-pushed the improvement/support-string-list-filters branch from d827544 to 688e227 Compare November 8, 2021 17:52
@stevelacey stevelacey marked this pull request as ready for review November 8, 2021 18:01
@stevelacey stevelacey merged commit 1ef5d4f into master Nov 9, 2021
@stevelacey stevelacey deleted the improvement/support-string-list-filters branch November 9, 2021 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant