From fd87cfd86effb9e61aa46955e1782a9c06f869a2 Mon Sep 17 00:00:00 2001 From: "Ing. Jan KRCMAR" Date: Mon, 26 Jun 2017 14:45:12 +0200 Subject: [PATCH] fix disk_size NoneType while determining vm disks size --- instances/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instances/views.py b/instances/views.py index 359c052..8dd0a3f 100644 --- a/instances/views.py +++ b/instances/views.py @@ -256,7 +256,8 @@ def instance(request, compute_id, vname): cpu += int(conn.get_vcpu()) memory += int(conn.get_memory()) for disk in conn.get_disk_device(): - disk_size += int(disk['size'])>>30 + if disk['size']: + disk_size += int(disk['size'])>>30 ua = request.user.userattributes msg = ""