Commit dbdb00b3 authored by Samuel GAIST's avatar Samuel GAIST

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

parent 41e99bf2
......@@ -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"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment