Browse Source

Fix field type to actually be hidden

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 <black.dex@gmail.com>
pull/5082/head
BlackDex 6 months ago
parent
commit
d0c5cecf8e
No known key found for this signature in database GPG Key ID: 58C80A2AA6C765E1
  1. 2
      src/db/models/cipher.rs

2
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::<u8>().unwrap_or(1);
let type_num = &t.as_str().unwrap_or("1").parse::<u8>().unwrap_or(1);
f.data["type"] = json!(type_num);
}
_ => {

Loading…
Cancel
Save