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

Improve CountryFilter to play nice with multiple=True #445

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pfouque
Copy link

@pfouque pfouque commented Nov 27, 2023

The current implementation of the admin CountryFilter doesn't works well when is_multiple=True.
It filters when there is only one value (strict equality) instead of using __contains.

(This version handles that but not the possibility to search with multiple countries)

@pfouque pfouque force-pushed the multiple_CountryFilter branch from 25f1f0b to 0b36c7b Compare April 25, 2024 12:29
@pfouque
Copy link
Author

pfouque commented Apr 25, 2024

I just noticed the "need-tests" label was added...
I added them, based on a variation of the existing ones. I hope it will be good enough
Note that I used AssertQuerySetEqual (instead of assertEqual) to ignore the ordering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants