]> git.proxmox.com Git - pve-manager.git/commitdiff
api: backup: update: allow only deleting
authorFiona Ebner <f.ebner@proxmox.com>
Wed, 16 Nov 2022 14:04:32 +0000 (15:04 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Jun 2023 14:47:08 +0000 (16:47 +0200)
Previously, it was required to set something at the same time.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/API2/Backup.pm

index 1d3d68963ebd3a92f137d8a6747b922564cc9934..c0800bac2b670b5eb227ef16d79bd540ee0b1f14 100644 (file)
@@ -443,7 +443,7 @@ __PACKAGE__->register_method({
 
            my $jobs = $data->{jobs} || [];
 
-           die "no options specified\n" if !scalar(keys %$param);
+           die "no options specified\n" if !scalar(keys $param->%*) && !scalar(keys $delete->%*);
 
            PVE::VZDump::verify_vzdump_parameters($param);
            my $opts = PVE::VZDump::JobBase->check_config($id, $param, 0, 1);