From 6cbad06f2c7e5c6f9a73350ff3ef3b805692159a Mon Sep 17 00:00:00 2001 From: "Ing. Jan KRCMAR" Date: Thu, 15 Feb 2018 10:54:39 +0100 Subject: [PATCH] instances/view/instance do not refresh media_iso when no media present --- instances/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instances/views.py b/instances/views.py index c67d554..196eaf3 100644 --- a/instances/views.py +++ b/instances/views.py @@ -314,7 +314,10 @@ def instance(request, compute_id, vname): disks = conn.get_disk_device() media = conn.get_media_device() networks = conn.get_net_device() - media_iso = sorted(conn.get_iso_media()) + if len(media) != 0: + media_iso = sorted(conn.get_iso_media()) + else: + media_iso = [] vcpu_range = conn.get_max_cpus() memory_range = [256, 512, 768, 1024, 2048, 4096, 6144, 8192, 16384] if memory not in memory_range: