[pve-devel] [PATCH manager 3/6] api: backup: update: allow only deleting

Fiona Ebner f.ebner at proxmox.com
Wed Nov 16 15:04:32 CET 2022


Previously, it was required to set something at the same time.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Backup.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm
index 1d3d6896..c0800bac 100644
--- a/PVE/API2/Backup.pm
+++ b/PVE/API2/Backup.pm
@@ -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);
-- 
2.30.2






More information about the pve-devel mailing list