From 879ebf85275e5f8942eb1a1e30d76cbee2a70715 Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Fri, 22 Feb 2019 12:38:04 -0500 Subject: Fixed Selection of single hosts in quick booking Change-Id: I8ca860ee23f9df44e38da76d539729771d32c455 Signed-off-by: Parker Berberian --- dashboard/src/account/views.py | 2 +- dashboard/src/resource_inventory/models.py | 2 +- dashboard/src/workflow/forms.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'dashboard/src') diff --git a/dashboard/src/account/views.py b/dashboard/src/account/views.py index 11689a1..6f390fa 100644 --- a/dashboard/src/account/views.py +++ b/dashboard/src/account/views.py @@ -228,7 +228,7 @@ def account_images_view(request): "images": my_images, "public_images": public_images, "used_images": used_images - } + } return render(request, template, context=context) diff --git a/dashboard/src/resource_inventory/models.py b/dashboard/src/resource_inventory/models.py index e1f2aa3..ebf63cc 100644 --- a/dashboard/src/resource_inventory/models.py +++ b/dashboard/src/resource_inventory/models.py @@ -266,7 +266,7 @@ class Image(models.Model): public = models.BooleanField(default=True) host_type = models.ForeignKey(HostProfile, on_delete=models.CASCADE) description = models.TextField() - os = models.ForeignKey(Opsys, null=True, on_delete=models.CASCADE) #sentinal? + os = models.ForeignKey(Opsys, null=True, on_delete=models.CASCADE) def __str__(self): return self.name diff --git a/dashboard/src/workflow/forms.py b/dashboard/src/workflow/forms.py index 726e7dd..03940d8 100644 --- a/dashboard/src/workflow/forms.py +++ b/dashboard/src/workflow/forms.py @@ -348,6 +348,8 @@ class FormUtils: slab['selected'] = 0 slab['selectable'] = 1 slab['follow'] = 1 + if not multiple_selectable_hosts: + slab['follow'] = 0 slab['multiple'] = 0 items[slab['id']] = slab mapping[slab['id']] = [] -- cgit 1.2.3-korg