client: don't pass empty backup-ns

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-05-10 14:35:06 +02:00 committed by Thomas Lamprecht
parent 028346e42c
commit 3c09413a0a
1 changed files with 7 additions and 1 deletions

View File

@ -279,7 +279,13 @@ async fn list_backup_groups(param: Value) -> Result<Value, Error> {
let backup_ns = optional_ns_param(&param)?; let backup_ns = optional_ns_param(&param)?;
let mut result = client let mut result = client
.get(&path, Some(json!({ "backup-ns": backup_ns }))) .get(
&path,
match backup_ns.is_root() {
true => None,
false => Some(json!({ "backup-ns": backup_ns })),
},
)
.await?; .await?;
record_repository(&repo); record_repository(&repo);