when undoing, decr sched.reps

This commit is contained in:
Damien Elmes 2012-11-02 08:32:53 +09:00
parent d56a456319
commit c7547a984f

View file

@ -602,10 +602,10 @@ where c.nid == f.id
"order by id desc limit 1", c.id)
self.db.execute("delete from revlog where id = ?", last)
# and finally, update daily counts
# fixme: what to do in cramming case?
n = 1 if c.queue == 3 else c.queue
type = ("new", "lrn", "rev")[n]
self.sched._updateStats(c, type, -1)
self.sched.reps -= 1
return c.id
def _markOp(self, name):