diff --git a/pylib/anki/stats.py b/pylib/anki/stats.py index cbbf4f20d..c8ffa2c0b 100644 --- a/pylib/anki/stats.py +++ b/pylib/anki/stats.py @@ -25,7 +25,8 @@ PERIOD_LIFE = 2 class CardStats: def __init__(self, col: anki.storage._Collection, card: anki.cards.Card) -> None: - self.col = col.weakref() + if col: + self.col = col.weakref() self.card = card self.txt = ""