mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
don't error when an add-on passes None to CardStats
https://anki.tenderapp.com/discussions/beta-testing/1842-syncing-message
This commit is contained in:
parent
fd81fca4aa
commit
2f24e3f5e2
1 changed files with 2 additions and 1 deletions
|
@ -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 = ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue