I am trying to use requests to send a filter query to Flask-Restless. The results are not filtered. How do I correctly write a filter?
import requests
import json
q = {'filters': [{'task': 'build an API', 'task': 'profit'}]}
r = requests.get('http://127.0.0.1:5000/toworks', params={'q': json.dumps(q)})
I expect the results to only contain the first and third items, but the second one is present as well.
{
"towork1": {
"task": "build an API"
},
"towork2": {
"task": "?????"
},
"towork3": {
"task": "profit!"
}
}