From 8c87743642debe78f47f5274d9dd4a4c5f50756d Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Wed, 27 May 2020 16:42:23 +0200 Subject: [PATCH] fix 'remove_vanished' cli arg again since the target side wants this to be a boolean and serde interprets a None Value as 'null' we have to only add this when it is really set via cli Signed-off-by: Dominik Csapak --- src/bin/proxmox-backup-manager.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index c6a2d03e..eefa9a85 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -284,13 +284,16 @@ async fn pull_datastore( let mut client = connect()?; - let args = json!({ + let mut args = json!({ "store": local_store, "remote": remote, "remote-store": remote_store, - "remove-vanished": remove_vanished, }); + if let Some(remove_vanished) = remove_vanished { + args["remove-vanished"] = Value::from(remove_vanished); + } + let result = client.post("api2/json/pull", Some(args)).await?; view_task_result(client, result, &output_format).await?;