Skip to content

Commit

Permalink
Revert real one
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Sep 18, 2024
1 parent 90df674 commit 2a332a2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions codeforlife/views/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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]"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 2a332a2

Please sign in to comment.