[pbs-devel] [PATCH proxmox-backup] set default for 'protected' flag

Dominik Csapak d.csapak at proxmox.com
Tue Nov 16 10:21:05 CET 2021


otherwise we cannot properly parse the api return value from older
versions, since that field does not exist there.

fixes sync from older versions without the protected feature

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 pbs-api-types/src/datastore.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index 77c1258f..e0aa2825 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -391,6 +391,7 @@ pub struct SnapshotListItem {
     #[serde(skip_serializing_if = "Option::is_none")]
     pub owner: Option<Authid>,
     /// Protection from prunes
+    #[serde(default)]
     pub protected: bool,
 }
 
-- 
2.30.2





More information about the pbs-devel mailing list