diff --git a/codeforlife/views/model.py b/codeforlife/views/model.py index 7a03050..14ed52f 100644 --- a/codeforlife/views/model.py +++ b/codeforlife/views/model.py @@ -183,9 +183,9 @@ def bulk_create(self, request: Request[RequestUser]): serializer.is_valid(raise_exception=True) self.perform_bulk_create(serializer) return Response( - dict(serializer.data), + serializer.data, status=status.HTTP_201_CREATED, - headers=self.get_success_headers(dict(serializer.data)), + headers=self.get_success_headers(serializer.data), ) def perform_bulk_create( @@ -224,7 +224,7 @@ def bulk_partial_update(self, request: Request[RequestUser]): ) serializer.is_valid(raise_exception=True) self.perform_bulk_update(serializer) - return Response(dict(serializer.data)) + return Response(serializer.data) def perform_bulk_update( self, serializer: "ModelListSerializer[RequestUser, AnyModel]" @@ -303,9 +303,7 @@ def update( ) serializer.is_valid(raise_exception=True) serializer.save() - return Response( - **(response_kwargs or {}), data=dict(serializer.data) - ) + return Response(**(response_kwargs or {}), data=serializer.data) update.__name__ = name