mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix 'PanicException: command requires weights to be set'
This commit is contained in:
parent
0e6104a96b
commit
f741b4af91
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ impl Collection {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
let fsrs = FSRS::new(req.as_ref().map(|w| &w.weights[..]))?;
|
||||
let fsrs = FSRS::new(req.as_ref().map(|w| &w.weights[..]).or(Some([].as_slice())))?;
|
||||
let items = fsrs_items_for_memory_state(&fsrs, revlog, timing.next_day_at);
|
||||
let desired_retention = req.as_ref().map(|w| w.desired_retention);
|
||||
let mut progress = self.new_progress_handler::<ComputeMemoryProgress>();
|
||||
|
|
Loading…
Reference in a new issue