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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
'__in' lookups don't work with CharFilter #2
Comments
Thanks for the detailed report! Yes, this is a bug. I came across this recently and it had been so long since writing the library that I got confused by it myself!
Anyway, this falls apart with multi-valued input as the conversion is applied to the raw input as-is; so CharFilter ends up running If you're interested in making a patch, https://github.com/bennullgraham/filternaut/blob/master/filternaut/filters.py#L44 probably needs to special-case input which appears to be a list, tuple, etc. Otherwise, I'll fix when I get a chance! |
Turns out I got a chance fairly quickly :) @jameswyse can you check that the |
Thanks for the detailed response! (and then for fixing it!) Your branch does appear to fix the problem I was seeing 馃榿 |
Fixed in 0.0.9 which is now on PyPI. Thanks again for the ticket 馃憤 |
CharFilter
doesn't seem to work with__in
lookups.. the array gets converted to a string whenCharFilter
callsclean
, sofield__in=['one', 'two']
becomesfield__in="['one', 'two']"
馃槶Is this a bug? Either way I switched to using
Filter
and it's working great :)Here's an example:
Filters
Using
CharFilter
:Using
Filter
:The text was updated successfully, but these errors were encountered: