mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12: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,6 +25,7 @@ PERIOD_LIFE = 2
|
||||||
|
|
||||||
class CardStats:
|
class CardStats:
|
||||||
def __init__(self, col: anki.storage._Collection, card: anki.cards.Card) -> None:
|
def __init__(self, col: anki.storage._Collection, card: anki.cards.Card) -> None:
|
||||||
|
if col:
|
||||||
self.col = col.weakref()
|
self.col = col.weakref()
|
||||||
self.card = card
|
self.card = card
|
||||||
self.txt = ""
|
self.txt = ""
|
||||||
|
|
Loading…
Reference in a new issue