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

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

parent 41e99bf2
No related branches found
No related tags found
1 merge request!327Refactor update creation api
......@@ -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.
Finish editing this message first!
Please register or to comment