handle vm without folder (vapp case)
This commit is contained in:
parent
8fc55ad522
commit
0576bc8a7f
|
@ -150,7 +150,7 @@ sub run {
|
|||
$vm{type} = "vm";
|
||||
$vm{name} = $vm->{'config.name'};
|
||||
$vm{uuid} = $vm->{'config.uuid'};
|
||||
$vm{folder} = $self->{paths}->{$vm->parent->value} if ($vm->parent->type eq 'Folder');
|
||||
$vm{folder} = (defined($vm->parent) && $vm->parent->type eq 'Folder') ? $self->{paths}->{$vm->parent->value} : '';
|
||||
$vm{annotation} = $vm->{'config.annotation'};
|
||||
$vm{os} = $vm->{'config.guestId'};
|
||||
$vm{hardware} = $vm->{'config.version'};
|
||||
|
|
Loading…
Reference in New Issue