]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/JSONSchema.pm
SectionConfig: disable duplicate plugin registration
[pve-common.git] / src / PVE / JSONSchema.pm
index de2a0bd993957343e4366a2e41fc5be485b98dab..a9a5400593c0954c2a3cc62ff76d8914744e1ed5 100644 (file)
@@ -582,12 +582,13 @@ sub print_property_string {
     }
 
     foreach my $key (sort keys %$data) {
-       die "invalid key: $key" if !$allowed{$key};
        delete $required{$key};
        next if $skipped{$key};
+       die "invalid key: $key" if !$allowed{$key};
 
        my $typeformat = $format->{$key}->{format};
        my $value = $data->{$key};
+       next if !defined($value);
        $text .= $comma;
        $comma = ',';
        if ($typeformat && $typeformat eq 'disk-size') {