-
Notifications
You must be signed in to change notification settings - Fork 300
-
Hi folks,
I stumbled across the following line and i'am not sure if this is the right way to figure out the serializer_class of the view, cause the ModelViewSet gets his own serializer_class by calling the get_serializer_class function.
Should this better rewrite to:
get_serializer_func = getattr(view, "get_serializer_class", None) if get_serializer_func: serializer_class = get_serializer_func() else: serializer_class = None
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
sliverc
Nov 25, 2021
Replies: 1 comment
-
This code bit was an invalid bug fix to allow the usage of the field name type again. The JSON:API spec does not allow this though so this code block will be removed in next major version (see TODO). See #993 for more details.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Answer selected by
jokiefer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment