Skip to content
Snippets Groups Projects
Commit 53e94d34 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[common][api] Adapt serializer for put on RetrieveUpdateDestroyContributionView

parent 18b7a932
No related branches found
No related tags found
No related merge requests found
......@@ -235,6 +235,11 @@ class RetrieveUpdateDestroyContributionView(
):
model = Contribution
def get_serializer(self, *args, **kwargs):
if self.request.method == "PUT":
self.serializer_class = self.writing_serializer_class
return super().get_serializer(*args, **kwargs)
def get_object(self):
version = self.kwargs["version"]
author_name = self.kwargs["author_name"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment