rest_framework.filters.OrderingFilter doesn't try to pass context from view.get_serializer_context #7860
Unanswered
erogleva
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
django-rest-framework/rest_framework/filters.py
Line 270 in 71e6c30
The
remove_invalid_fields
method of the OrderingFilter doesn't try to get the serializer context from theget_serializer_context
method of the view but instead only passes the request as a context. This can lead to bugs in the case when the serializer expects additional (custom) keys in the context. Is there any specific reason not to include it? I'd be happy to open a PR if you think that it should be fixedBeta Was this translation helpful? Give feedback.
All reactions