Skip to content

Commit

Permalink
Avoid constructing serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Apr 5, 2023
1 parent 0366cf6 commit cb142c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cvat/apps/engine/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ def export_annotations(self, request, db_obj, export_func, callback, get_data=No
return Response("Format is not specified",status=status.HTTP_400_BAD_REQUEST)

data = get_data(self._object.pk)
serializer = LabeledDataSerializer(data=data)
return Response(serializer.initial_data)
return Response(data)

def import_annotations(self, request, db_obj, import_func, rq_func, rq_id):
is_tus_request = request.headers.get('Upload-Length', None) is not None or \
Expand Down

0 comments on commit cb142c2

Please sign in to comment.