]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/RESTHandler.pm
api dump: do not skip indexed params with only one index
[pve-common.git] / src / PVE / RESTHandler.pm
index 5d0c03d0d92ee1ee18d16fbc94540fab307e5ce1..205e6efd130bf6d2e6079d67efc1742277b67f64 100644 (file)
@@ -37,7 +37,7 @@ sub api_clone_schema {
                my ($name, $idx) = ($1, $2);
                if ($idx == 0 && defined($d->{"${name}1"})) {
                    $p = "${name}[n]";
-               } elsif (defined($d->{"${name}0"})) {
+               } elsif ($idx > 0 && defined($d->{"${name}0"})) {
                    next; # only handle once for -xx0, but only if -xx0 exists
                }
            }