From b5fed631d5da14291e750efaf525bc342469bb77 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sat, 8 Feb 2020 22:49:28 -0800 Subject: [PATCH] deckIds return deck of selected cards --- pylib/anki/exporting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 []