djangorestframework-queryfields icon indicating copy to clipboard operation
djangorestframework-queryfields copied to clipboard

self.context is getting cleared in serializers.SerializerMethodField()

Open sharrajesh opened this issue 7 years ago • 1 comments

First please accept my gratitude for this awesome util.

If I derive my serializer from this mixin and if my serializer have a field which is a serializer.SerializerMethodField.

In that method we have been using self.context['request']; which stays available if I donot derive my serializer from QueryFieldMixin by it disappears if I do.

Any guidance will be appreciated

sharrajesh avatar Jun 03 '18 05:06 sharrajesh

Hi @sharrajesh , I saw your PR, but it's not clear to me what it's fixing. Could you please make a failing test case which reproduces the issue?

wimglenn avatar Jun 03 '18 15:06 wimglenn