openverse-api
openverse-api copied to clipboard
The mature filter is not working
Description
Search for something setting the mature filter to true, e.g.: https://api-dev.openverse.engineering/v1/images/?q=car&mature=true
This returns items that have mature=false in them.
Additional context
The check for mature parameter being a boolean works correctly. When I use mature as the value for mature query parameter, it returns an error:
GET /v1/images/?q=car&mature=mature
HTTP 400 Bad Request
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"detail": {
"mature": [
"Must be a valid boolean."
]
}
}
Resolution
- [ ] 🙋 I would be interested in resolving this bug.
The mature filter isn't meant to only show mature images, just include them. So mature results would contain results that are true and false, I think? We have very few images on the API side actually flagged as mature, so I'm not confident how to test this.