From 620f16c876bdfcba3518ee901648ce4a1751942a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 26 Feb 2012 04:30:56 +0900 Subject: [PATCH] fix forgetCards() bug --- anki/sched.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anki/sched.py b/anki/sched.py index 4dcfff3f0..ac4c29d43 100644 --- a/anki/sched.py +++ b/anki/sched.py @@ -863,7 +863,8 @@ your short-term review workload will become.""")) "Put cards at the end of the new queue." self.col.db.execute( "update cards set type=0,queue=0,ivl=0 where id in "+ids2str(ids)) - pmax = self.col.db.scalar("select max(due) from cards where type=0") + pmax = self.col.db.scalar( + "select max(due) from cards where type=0") or 0 # takes care of mod + usn self.sortCards(ids, start=pmax+1)