Skip to content

Commit

Permalink
Fix field type to actually be hidden
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
BlackDex committed Oct 13, 2024
1 parent 49c5dec commit d0c5cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/models/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
_ => {
Expand Down

0 comments on commit d0c5cec

Please sign in to comment.