-
Notifications
You must be signed in to change notification settings - Fork 770
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
QueryArrayWidget does not work with the foo=bar,baz syntax #1685
Comments
I'm not sure I'm following. 🤔 The query array widget is for query strings using the old PHP format, Can you clarify what you're trying to do here? |
According to the docs it should work with all three formats. But it doesn’t and this fixes that 🙂
|
Ok, so the first port of call is a failing test case demonstrating the issue, and then we can look at whether the fix is optimal, or if we can find a better one. Would you like to make a PR? |
See here: First commit shows the failing test As a side note: how can the tests be so fast? Does it skip database tests? |
According to the docs (
django-filter/django_filters/widgets.py
Line 240 in 4a3eb8b
The problem here is that a QueryDict (the actual data type) is a subclass of MultiValueDict and the result always returns False and the data never get into the if statement.
I fixed it by replacing the code with:
But I'm sure there must be a better fix.
The text was updated successfully, but these errors were encountered: