encode / django-rest-framework

Web APIs for Django. 🎸
https://www.django-rest-framework.org
Other
28.45k stars 6.84k forks source link

Filter backend schema inspector issue #5594

Closed matiucarr closed 6 years ago

matiucarr commented 7 years ago

Checklist

Steps to reproduce

Expected behavior

Filter options should render under the appropriate method in swagger, etc.

Actual behavior

a fix

change

return method.lower in ["get", "put", "patch", "delete"]

to

return method.lower() in ["get", "put", "patch", "delete"]
carltongibson commented 7 years ago

Yep. That seems like a bug. (Wondering about test coverage there...)

@matiucarr If you're up for it we'd happily see a PR (with a small failing test) to address this.

Thanks for the report!

D3X commented 6 years ago

@carltongibson I've created a PR with a test and a fix here: #5613 Let me know if that test makes sense in your opinion.

rpkilby commented 6 years ago

Thanks @D3X!