From 94913ec23fc6355c93131f7036490e76c2957f43 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 4 Aug 2021 12:57:46 +1000 Subject: [PATCH] fallback on default deck in congrats screen https://forums.ankiweb.net/t/error-when-trying-to-choose-deck-in-new-anki/11829 --- rslib/src/scheduler/congrats.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rslib/src/scheduler/congrats.rs b/rslib/src/scheduler/congrats.rs index aea2b3cab..364344ddd 100644 --- a/rslib/src/scheduler/congrats.rs +++ b/rslib/src/scheduler/congrats.rs @@ -15,8 +15,7 @@ pub(crate) struct CongratsInfo { impl Collection { pub fn congrats_info(&mut self) -> Result { - let did = self.get_current_deck_id(); - let deck = self.get_deck(did)?.ok_or(AnkiError::NotFound)?; + let deck = self.get_current_deck()?; let today = self.timing_today()?.days_elapsed; let info = self.storage.congrats_info(&deck, today)?; let is_filtered_deck = deck.is_filtered();