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.
This commit is contained in:
RumovZ 2020-12-29 00:29:36 +01:00
parent 398e7d7845
commit 9f18e12cb8

View File

@ -430,7 +430,7 @@ class DeckManager:
def selected(self) -> int: def selected(self) -> int:
"The currently selected did." "The currently selected did."
return self.col.conf["curDeck"] return int(self.col.conf["curDeck"])
def current(self) -> Deck: def current(self) -> Deck:
return self.get(self.selected()) return self.get(self.selected())