when listing volumes, otherwise an empty hash can be persisted into the
current worker's $vmlist, which could cause issues at various other API
endpoints.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
foreach my $item (@$data) {
if ($type eq 'images' || $type eq 'rootdir') {
-
- my $vmtype = $vmlist->{ids}->{$item->{vmid}}->{type};
+ my $vminfo = $vmlist->{ids}->{$item->{vmid}};
+ my $vmtype;
+ if (defined($vminfo)) {
+ $vmtype = $vminfo->{type};
+ }
if (defined($vmtype) && $vmtype eq 'lxc') {
$item->{content} = 'rootdir';
} else {