mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
compat hack for suspended cards on older platforms
This commit is contained in:
parent
1f20442921
commit
de18f59474
1 changed files with 4 additions and 0 deletions
|
@ -3049,6 +3049,10 @@ class DeckStorage(object):
|
||||||
deck.currentModel = deck.models[0]
|
deck.currentModel = deck.models[0]
|
||||||
# ensure the necessary indices are available
|
# ensure the necessary indices are available
|
||||||
deck.updateDynamicIndices()
|
deck.updateDynamicIndices()
|
||||||
|
# FIXME: temporary code to ensure cards suspended on older clients are
|
||||||
|
# recognized
|
||||||
|
deck.s.statement("""
|
||||||
|
update cards set type = type + 3 where type < 3 and priority <= 0""")
|
||||||
# unsuspend reviewed early & buried
|
# unsuspend reviewed early & buried
|
||||||
ids = deck.s.column0(
|
ids = deck.s.column0(
|
||||||
"select id from cards where type in (3,4,5) and priority in (-1, -2)")
|
"select id from cards where type in (3,4,5) and priority in (-1, -2)")
|
||||||
|
|
Loading…
Reference in a new issue