fix forgetCards() bug

This commit is contained in:
Damien Elmes 2012-02-26 04:30:56 +09:00
parent afbe1a4a64
commit 620f16c876

View file

@ -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)