From 9f18e12cb8160152997e7e2ee6401f9eb7129e36 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Tue, 29 Dec 2020 00:29:36 +0100 Subject: [PATCH] Fix deck check and thus blue snyc arrow bug Cast col.decks.selected() to int so the return type fits the annotation. Thus, fix the comparison in col.decks.select() which was leading to a superfluous db modification and in turn to a false indication of a necessary sync right after another one in certain cases. --- pylib/anki/decks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index 2c0132b5a..0c71ceeac 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -430,7 +430,7 @@ class DeckManager: def selected(self) -> int: "The currently selected did." - return self.col.conf["curDeck"] + return int(self.col.conf["curDeck"]) def current(self) -> Deck: return self.get(self.selected())