Collection: disallow partial updates.

This commit is contained in:
Tom Hacohen 2020-04-19 15:13:09 +03:00
parent af27871955
commit d66d0640dc

View File

@ -95,6 +95,9 @@ class CollectionViewSet(BaseViewSet):
# FIXME: implement # FIXME: implement
return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED) return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED)
def partial_update(self, request, uid=None):
return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED)
def create(self, request, *args, **kwargs): def create(self, request, *args, **kwargs):
serializer = self.serializer_class(data=request.data, context=self.get_serializer_context()) serializer = self.serializer_class(data=request.data, context=self.get_serializer_context())
if serializer.is_valid(): if serializer.is_valid():