fix infinite loop on card answer when parent is missing deck

This commit is contained in:
Damien Elmes 2021-03-04 11:02:48 +10:00
parent edaabee942
commit 07989afa38

View File

@ -202,6 +202,9 @@ impl SqliteStorage {
if let Some(parent_did) = self.get_deck_id(parent_name)? { if let Some(parent_did) = self.get_deck_id(parent_name)? {
let parent = self.get_deck(parent_did)?.unwrap(); let parent = self.get_deck(parent_did)?.unwrap();
decks.push(parent); decks.push(parent);
} else {
// missing parent
break;
} }
} }