-
Notifications
You must be signed in to change notification settings - Fork 753
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
issue with query filter on django.JSONField #1313
Comments
I found out this problem can solve with this way
and inside my filter
I thing it is good idea add this solution to your document |
Thanks @amirhoseinbidar — I’m going to mark this a duplicate of #1298 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
django-filter can not filter on jsonField with NumberFilter
my situation is something like below desctiption
I have a model like this
assume some of extra_data always have something like
{ "size": 200 }
my filter is
when i call my end point (EXAMPLE: http://localhost:8001/api/products/rent/product/?extra_size=200) this error will raise
after some debug I found out this error is because NumberFilter turn income numbers to Decimal objects and jsonfield just
can not handle Decimal object
I am not sure this issue is yours or for JSONField but I will report same bug for JSONField
The text was updated successfully, but these errors were encountered: