Open radudum10 opened 8 months ago
Turns out they broke the interface by forgetting to return the param list from the method. Created a PR upstream:
https://github.com/openwisp/django-rest-framework-gis/pull/293
You could also hotfix it with an OpenApiFilterExtension that replaces that broken method in the meantime.
Not sure if we want to wrap this with a try/catch because we usually do not hide upstream bugs for obvious reasons.
Thanks for the PR and the fix suggestion! yep, it would be better to keep it how it is
Thanks for sending https://github.com/openwisp/django-rest-framework-gis/pull/293, it's merged :+1:
Describe the bug When including DistanceToPointOrderingFilter (source code an unhandled TypeError is raised, as you can see in this stack trace:
I don't know if this is a bug or my implementation is faulty.
To Reproduce
Package versions:
REST_FRAMEWORK
settings for filter backends:The problematic view:
where shape is a
MultiPolygonField
and DistanceToPointOrderingFilter is imported like this:Expected behavior If I remove the DistanceToPointOrderingFilter everything works as expected, so I would expect the same behaviour if I add this specific filter backend.
Judging by the line raising the exception, I think
get_schema_operation_parameters
somehow returnsNone
. Maybe, it would be good a idea to handle theTypeError
?Thanks for developing this package!