From b02aa2535c7b7beacbc2d7d24d8522fa596afeee Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Tue, 20 Nov 2018 11:19:55 -0500 Subject: Fixed Misc Bugs Some corner cases that cause issues recently came to our attention. Fixes issues in the booking workflow and the Notification system. Change-Id: Ie16118ba1bdbeff86bb41a16dc783337b921d527 Signed-off-by: Parker Berberian --- dashboard/src/workflow/sw_bundle_workflow.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'dashboard/src/workflow/sw_bundle_workflow.py') diff --git a/dashboard/src/workflow/sw_bundle_workflow.py b/dashboard/src/workflow/sw_bundle_workflow.py index 56d0a5d..26ade22 100644 --- a/dashboard/src/workflow/sw_bundle_workflow.py +++ b/dashboard/src/workflow/sw_bundle_workflow.py @@ -69,7 +69,15 @@ class Define_Software(WorkflowStep): user = self.repo_get(self.repo.SESSION_USER) i = 0 for host_data in hosts_initial: - host = GenericHost.objects.get(pk=host_data['host_id']) + host_profile = None + try: + host = GenericHost.objects.get(pk=host_data['host_id']) + host_profile = host.profile + except Exception: + for host in hostlist: + if host.resource.name == host_data['host_name']: + host_profile = host.profile + break excluded_images = Image.objects.exclude(owner=user).exclude(public=True) excluded_images = excluded_images | Image.objects.exclude(host_type=host.profile) lab = self.repo_get(self.repo.SWCONF_SELECTED_GRB).lab -- cgit 1.2.3-korg