pending api : fix parsing 0 value

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2015-01-12 15:32:17 +01:00 committed by Dietmar Maurer
parent 8fe689e7fd
commit 0e54e1c8bd

View File

@ -770,7 +770,7 @@ __PACKAGE__->register_method({
foreach my $opt (keys $conf->{pending}) { foreach my $opt (keys $conf->{pending}) {
next if $opt eq 'delete'; next if $opt eq 'delete';
next if ref($conf->{pending}->{$opt}); # just to be sure next if ref($conf->{pending}->{$opt}); # just to be sure
next if $conf->{$opt}; next if defined($conf->{$opt});
my $item = { key => $opt }; my $item = { key => $opt };
$item->{pending} = $conf->{pending}->{$opt}; $item->{pending} = $conf->{pending}->{$opt};
push @$res, $item; push @$res, $item;