From af23dd8faeefedcb9183c3fce8637310399bbffa Mon Sep 17 00:00:00 2001 From: Trung Trinh Date: Tue, 4 Nov 2014 23:29:29 +1400 Subject: [PATCH] Fix Horizon crash when parsing volume list If using Nova or Cinder CLI to create a new volume (without name) that can be used to boot a new VM, then Horizon will be crashed when the volume list is retrieved by clicking the tab "Volumes" on Horizon dashboard. Change-Id: I9850dca2f6f5ab8eebab035f9e7cf19d7262f7d2 Closes-Bug: #1389108 --- .../dashboards/project/volumes/volumes/tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/volumes/volumes/tables.py b/openstack_dashboard/dashboards/project/volumes/volumes/tables.py index 6851737d02..8e316b931a 100644 --- a/openstack_dashboard/dashboards/project/volumes/volumes/tables.py +++ b/openstack_dashboard/dashboards/project/volumes/volumes/tables.py @@ -293,7 +293,7 @@ class AttachmentColumn(tables.Column): # without the server name... instance = get_attachment_name(request, attachment) vals = {"instance": instance, - "dev": html.escape(attachment["device"])} + "dev": html.escape(attachment.get("device", ""))} attachments.append(link % vals) return safestring.mark_safe(", ".join(attachments))