Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure context is passed through when calling get_serializer #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jamesfneyer
Copy link
Contributor

When calling get_serializer on ConfigurableGenericViewSet, ensure that context is passed through, and not overwritten by the get_serializer_context in the default get_serializer.

@jamesfneyer jamesfneyer requested a review from mlclay October 26, 2020 19:07
Copy link
Contributor

@mlclay mlclay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the same logic the upstream repository used to handle this new functionality: encode/django-rest-framework#7298

@jamesfneyer
Copy link
Contributor Author

I originally did it this way so that the default context would not be overwritten, but instead expanded.

Copy link
Contributor

@mlclay mlclay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for the update for context precedence parity with upstream. I'd like this to not deviate too far from the expected DRF ViewSet functionality where we can manage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants