Enzo Yair

se agrego metodo patch

... ... @@ -14,7 +14,6 @@ from .utils import contador
class EdictoViewSet(mixins.CreateModelMixin,
mixins.RetrieveModelMixin,
mixins.UpdateModelMixin,
mixins.ListModelMixin,
viewsets.GenericViewSet):
... ... @@ -36,10 +35,9 @@ class EdictoViewSet(mixins.CreateModelMixin,
usuario_movimiento=usuario,
)
@action(detail=True, methods=['patch'])
def custom_update(self, request):
def partial_update(self, request):
instance = self.get_object()
serializer = self.get_serializer(instance, data=request.data)
serializer = self.get_serializer(instance, data=request.data, partial=True)
serializer.is_valid(raise_exception=True)
edicto = request.data.get('cuerpo_edicto')
... ...