From 50924d3c66a952c29d5a1e51ba030ce205a62246 Mon Sep 17 00:00:00 2001 From: Eric Park Date: Tue, 29 Jun 2021 14:32:36 +0900 Subject: [PATCH] shipper: views: expose build ID For later --- shipper/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shipper/views.py b/shipper/views.py index 17df2868..7dc03893 100644 --- a/shipper/views.py +++ b/shipper/views.py @@ -126,7 +126,7 @@ def build_upload(request, pk): form = BuildUploadForm(request.POST, request.FILES) if form.is_valid(): try: - handle_build(device, request.FILES["zip_file"], request.FILES["md5_file"]) + build_id = handle_build(device, request.FILES["zip_file"], request.FILES["md5_file"]) except UploadException as exception: return render(request, 'shipper/build_upload.html', { 'upload_succeeded': False, @@ -138,7 +138,8 @@ def build_upload(request, pk): return render(request, 'shipper/build_upload.html', { 'upload_succeeded': True, 'device': device, - 'form': form + 'form': form, + 'build_id': build_id }) return render(request, 'shipper/build_upload.html', { 'upload_succeeded': False,