mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
return current weights if fsrs_items is zero
This commit is contained in:
parent
a1fa865bb2
commit
e269983150
1 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,12 @@ impl Collection {
|
||||||
fsrs_items_for_training(revlogs.clone(), timing.next_day_at, ignore_revlogs_before);
|
fsrs_items_for_training(revlogs.clone(), timing.next_day_at, ignore_revlogs_before);
|
||||||
|
|
||||||
let fsrs_items = items.len() as u32;
|
let fsrs_items = items.len() as u32;
|
||||||
|
if fsrs_items == 0 {
|
||||||
|
return Ok(ComputeFsrsWeightsResponse {
|
||||||
|
weights: current_weights.to_vec(),
|
||||||
|
fsrs_items,
|
||||||
|
});
|
||||||
|
}
|
||||||
anki_progress.update(false, |p| {
|
anki_progress.update(false, |p| {
|
||||||
p.current_preset = current_preset;
|
p.current_preset = current_preset;
|
||||||
p.total_presets = total_presets;
|
p.total_presets = total_presets;
|
||||||
|
|
Loading…
Reference in a new issue