api2/types/tape/media_location: fix deserialization of MediaLocation::Vault

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-02-11 14:11:19 +01:00 committed by Dietmar Maurer
parent 56d22c66c0
commit 7c9fb570cc
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ impl std::str::FromStr for MediaLocation {
return Ok(MediaLocation::Online(changer.to_string()));
}
if let Some(vault) = s.strip_prefix("vault-") {
return Ok(MediaLocation::Online(vault.to_string()));
return Ok(MediaLocation::Vault(vault.to_string()));
}
bail!("MediaLocation parse error");