From 2226107cc6e3adaa6f9723568a84fc910c1630c7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 1 Aug 2023 09:10:45 +0200 Subject: [PATCH] api-types: set serde defaults for UserWithTokens since `totp_locked` is not wrapped in an `Option` we need to explicitly tell serde about its default Signed-off-by: Wolfgang Bumiller --- pbs-api-types/src/user.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbs-api-types/src/user.rs b/pbs-api-types/src/user.rs index 595c8702..42f41266 100644 --- a/pbs-api-types/src/user.rs +++ b/pbs-api-types/src/user.rs @@ -104,7 +104,7 @@ pub struct UserWithTokens { pub email: Option, #[serde(skip_serializing_if = "Vec::is_empty", default)] pub tokens: Vec, - #[serde(skip_serializing_if = "bool_is_false")] + #[serde(skip_serializing_if = "bool_is_false", default)] pub totp_locked: bool, #[serde(skip_serializing_if = "Option::is_none")] pub tfa_locked_until: Option,