]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/RESTHandler.pm
Fix indexed parameter conversion in API dump
[pve-common.git] / src / PVE / RESTHandler.pm
index 6799fde7668e4c2a38b78c883187e877c012fc46..ca3f99b5b58e8a948cf9976db8ef4e76b94670ba 100644 (file)
@@ -36,8 +36,8 @@ sub api_clone_schema {
            if ($p =~ m/^([a-z]+)(\d+)$/) {
                if ($2 == 0) {
                    $p = "$1\[n\]";
-               } else {
-                   next;
+               } elsif (defined($d->{$1.'0'})) {
+                   next; # only handle once for -xx0, but only if -xx0 exists
                }
            }
            $res->{$k}->{$p} = ref($pd) ? clone($pd) : $pd;