OrderingFilter
should call get_serializer_class()
to determine default fields. by bmampaey · Pull Request #3964 · encode/django-rest-framework (original) (raw)
refs #3957
I made the proposed change
Because the default get_serializer_class method of GenericAPIView throw an Assertion error if there is no serializer_class defined on the view, I made a try except block that catches the exception and return the message as defined previously. I don't know if that is the correct idea.
I also added 3 tests for this fix.