From 65629a99f07ec399cd574a4f20b6e73c2ba8f2a3 Mon Sep 17 00:00:00 2001 From: Mathijs van Veluw Date: Sun, 13 Oct 2024 20:32:15 +0200 Subject: [PATCH] Fix field type to actually be hidden (#5082) In an oversight i forgot to set the type to a hidden type if converting the int was not possible. This fixes that. Signed-off-by: BlackDex --- src/db/models/cipher.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index 9dc9cba5..06aa69c5 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -186,7 +186,7 @@ impl Cipher { match f.data.get("type") { Some(t) if t.is_number() => {} Some(t) if t.is_string() => { - let type_num = &t.as_str().unwrap_or("0").parse::().unwrap_or(1); + let type_num = &t.as_str().unwrap_or("1").parse::().unwrap_or(1); f.data["type"] = json!(type_num); } _ => {