From 940e4d9ea65825df9253f16557e79719ceefa91d Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 10 Feb 2012 08:32:17 +0100 Subject: [PATCH] fix pool stats --- PVE/API2/Cluster.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 354cc1d0..c34bb971 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -182,7 +182,7 @@ __PACKAGE__->register_method({ my $data = $idlist->{$vmid}; my $entry = PVE::API2Tools::extract_vm_stats($vmid, $data, $rrd); - if (defined($entry->{uptime})) { + if ($entry->{uptime}) { if (my $pool = $usercfg->{vms}->{$vmid}) { if (my $pe = $pooldata->{$pool}) { $pe->{uptime} = $entry->{uptime} if !$pe->{uptime} || $entry->{uptime} > $pe->{uptime};