Skip to content

Commit

Permalink
shipper: views: send back build ID to shippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswpark committed Jun 29, 2021
1 parent 50924d3 commit 6fdf7f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shipper/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _post(self, request, pk=None, *args, **kwargs):
)

try:
handle_chunked_build(device, chunked_upload, request.POST.get('md5'))
build_id = handle_chunked_build(device, chunked_upload, request.POST.get('md5'))
except UploadException as exception:
chunked_upload.delete()
return Response(
Expand All @@ -217,7 +217,8 @@ def _post(self, request, pk=None, *args, **kwargs):

return Response(
{
'message': 'Build has been uploaded for device {}!'.format(device)
'message': 'Build has been uploaded for device {}!'.format(device),
'build_id': build_id
},
status=HTTP_200_OK
)
Expand Down

0 comments on commit 6fdf7f0

Please sign in to comment.