]> git.proxmox.com Git - proxmox.git/commitdiff
tfa: fix deserialize-default in TfaUser
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 6 Dec 2023 13:54:46 +0000 (14:54 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 6 Dec 2023 13:54:47 +0000 (14:54 +0100)
Note that this was currently not deserialized anywhere, so this was
not an issue, but the api-macro now treats this as an error.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-tfa/src/api/methods.rs

index 86781908e5034826a76626e09b047e6e9a4fa89b..17715b8772ff6e73e42a1565fb3c830be8899db0 100644 (file)
@@ -235,7 +235,7 @@ pub struct TfaUser {
     pub entries: Vec<TypedTfaInfo>,
 
     /// The user is locked out of TOTP authentication.
-    #[serde(skip_serializing_if = "super::bool_is_false")]
+    #[serde(default, skip_serializing_if = "super::bool_is_false")]
     pub totp_locked: bool,
 
     /// If a user's second factor is blocked, this contains the block's expiration time.