mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
handle missing counts in sanity check
This commit is contained in:
parent
403ac2715c
commit
4917cabeb9
1 changed files with 3 additions and 2 deletions
|
@ -11,6 +11,7 @@ use crate::{
|
||||||
notes::{guid, Note},
|
notes::{guid, Note},
|
||||||
notetype::{NoteType, NoteTypeSchema11},
|
notetype::{NoteType, NoteTypeSchema11},
|
||||||
prelude::*,
|
prelude::*,
|
||||||
|
serde::default_on_invalid,
|
||||||
tags::{join_tags, split_tags},
|
tags::{join_tags, split_tags},
|
||||||
version::sync_client_version,
|
version::sync_client_version,
|
||||||
};
|
};
|
||||||
|
@ -171,9 +172,9 @@ pub struct CardEntry {
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct SanityCheckOut {
|
pub struct SanityCheckOut {
|
||||||
status: SanityCheckStatus,
|
status: SanityCheckStatus,
|
||||||
#[serde(rename = "c")]
|
#[serde(rename = "c", default, deserialize_with = "default_on_invalid")]
|
||||||
client: Option<SanityCheckCounts>,
|
client: Option<SanityCheckCounts>,
|
||||||
#[serde(rename = "s")]
|
#[serde(rename = "s", default, deserialize_with = "default_on_invalid")]
|
||||||
server: Option<SanityCheckCounts>,
|
server: Option<SanityCheckCounts>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue