fix undefined error in thinprovisioningvm

This commit is contained in:
garnier-quentin 2019-10-18 16:37:36 +02:00
parent 335601da8b
commit 4191b6f350
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ sub run {
foreach (@{$entity_view->{'config.hardware.device'}}) {
if ($_->isa('VirtualDisk')) {
push @{$data->{$entity_value}->{disks}}, { thin_provisioned => $_->backing->thinProvisioned, name => $_->backing->fileName };
next if (!defined($_->{backing}->{thinProvisioned}));
push @{$data->{$entity_value}->{disks}}, { thin_provisioned => $_->{backing}->{thinProvisioned}, name => $_->{backing}->{fileName} };
}
}
}