[pve-devel] [PATCH] pending api : fix parsing 0 value

Alexandre Derumier aderumier at odiso.com
Mon Jan 12 15:32:17 CET 2015


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Qemu.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 50d6e52..def4e5c 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -770,7 +770,7 @@ __PACKAGE__->register_method({
 	foreach my $opt (keys $conf->{pending}) {
 	    next if $opt eq 'delete';
 	    next if ref($conf->{pending}->{$opt}); # just to be sure
-	    next if $conf->{$opt};
+	    next if defined($conf->{$opt});
 	    my $item = { key => $opt };
 	    $item->{pending} = $conf->{pending}->{$opt};
 	    push @$res, $item;
-- 
1.7.10.4




More information about the pve-devel mailing list