api2: datastore/delete_group: throw error for partially removed group
when a group could not be completely removed due to protected snapshot, throw an error Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
343392613d
commit
5cc7d89139
@ -272,7 +272,9 @@ pub fn delete_group(
|
||||
|
||||
check_priv_or_backup_owner(&datastore, &group, &auth_id, PRIV_DATASTORE_MODIFY)?;
|
||||
|
||||
datastore.remove_backup_group(&group)?;
|
||||
if !datastore.remove_backup_group(&group)? {
|
||||
bail!("did not delete whole group because of protected snapthots");
|
||||
}
|
||||
|
||||
Ok(Value::Null)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user