From 8e0f00fbb946451445dd04bb12f2b378d2e4d341 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 26 Mar 2021 11:27:49 +1000 Subject: [PATCH] fix .select() not handling string arguments --- pylib/anki/decks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index 1d877ad54..0f50d310b 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -448,7 +448,8 @@ class DeckManager: def select(self, did: DeckID) -> None: "Select a new branch." - # make sure arg is an int + # make sure arg is an int; legacy callers may be passing in a string + did = DeckID(did) current = self.selected() active = self.deck_and_child_ids(did) if current != did or active != self.active():