From 5b662df47491f9a60176e2e3d71a00b4c704cf50 Mon Sep 17 00:00:00 2001 From: Chad Roberts Date: Mon, 2 Mar 2015 14:46:37 -0500 Subject: [PATCH] Fixing job binary creation from existing file Fixing the ability to create a data processing job binary from an file that already exists in the internal database. Change-Id: I1ba065958b2987059c5faeb1182ddb01c721f907 Closes-Bug: #1427289 --- .../dashboards/project/data_processing/job_binaries/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py b/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py index 691a1374dc..5159d2231e 100644 --- a/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py +++ b/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py @@ -210,6 +210,7 @@ class JobBinaryCreateForm(forms.SelfHandlingForm): self.get_unique_binary_name( request, request.FILES["job_binary_file"].name), request.FILES["job_binary_file"].read()) + bin_id = result.id except Exception: exceptions.handle(request, _("Unable to upload job binary")) @@ -221,12 +222,12 @@ class JobBinaryCreateForm(forms.SelfHandlingForm): self.get_unique_binary_name( request, context["job_binary_script_name"]), context["job_binary_script"]) + bin_id = result.id except Exception: exceptions.handle(request, _("Unable to create job binary")) return None - bin_id = result.id return "internal-db://%s" % bin_id def handle_swift(self, request, context):