]> git.proxmox.com Git - pve-common.git/commitdiff
print_property_string: skip undefined values
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 29 Oct 2015 13:56:58 +0000 (14:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 30 Oct 2015 06:03:10 +0000 (07:03 +0100)
src/PVE/JSONSchema.pm

index de2a0bd993957343e4366a2e41fc5be485b98dab..e83d8dea42a3797bc610530bea86f3aca6a6f5ea 100644 (file)
@@ -588,6 +588,7 @@ sub print_property_string {
 
        my $typeformat = $format->{$key}->{format};
        my $value = $data->{$key};
 
        my $typeformat = $format->{$key}->{format};
        my $value = $data->{$key};
+       next if !defined($value);
        $text .= $comma;
        $comma = ',';
        if ($typeformat && $typeformat eq 'disk-size') {
        $text .= $comma;
        $comma = ',';
        if ($typeformat && $typeformat eq 'disk-size') {