mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix upgrade of learning cards in 1.2
- interval must be 1+ days - type must be 2
This commit is contained in:
parent
233bf555b4
commit
0fcf36c2a7
1 changed files with 4 additions and 3 deletions
|
@ -682,9 +682,10 @@ and ord = ? limit 1""", m['id'], t['ord']):
|
||||||
for t in ("cards", "notes", "models", "media"):
|
for t in ("cards", "notes", "models", "media"):
|
||||||
col.db.execute("drop table if exists %sDeleted" % t)
|
col.db.execute("drop table if exists %sDeleted" % t)
|
||||||
# and failed cards
|
# and failed cards
|
||||||
left = len(col.decks.confForDid(1)['new']['delays'])*1001
|
left = len(col.decks.confForDid(1)['lapse']['delays'])*1001
|
||||||
col.db.execute("update cards set odue = ?, left=? where type = 1",
|
col.db.execute("""
|
||||||
col.sched.today+1, left)
|
update cards set odue = ?, left=?, type=2, ivl=max(ivl, 1) where type=1""",
|
||||||
|
col.sched.today+1, left)
|
||||||
# and due cards
|
# and due cards
|
||||||
col.db.execute("""
|
col.db.execute("""
|
||||||
update cards set due = cast(
|
update cards set due = cast(
|
||||||
|
|
Loading…
Reference in a new issue