diff --git a/pylib/anki/exporting.py b/pylib/anki/exporting.py index a454ed370..c6ba97f20 100644 --- a/pylib/anki/exporting.py +++ b/pylib/anki/exporting.py @@ -170,7 +170,9 @@ class AnkiExporter(Exporter): Exporter.__init__(self, col) def deckIds(self) -> List[int]: - if self.did: + if self.cids: + return self.col.decks.for_card_ids(self.cids) + elif self.did: return [self.did] + [x[1] for x in self.src.decks.children(self.did)] else: return []