fix inverted cmp in leech handler

This commit is contained in:
Damien Elmes 2012-04-28 16:29:59 +09:00
parent f6b620f9ed
commit 491596096a

View file

@ -834,7 +834,7 @@ did = ?, queue = %s, due = ?, mod = ?, usn = ? where id = ?""" % queue, data)
if not lf:
return
# if over threshold or every half threshold reps after that
if (lf >= card.lapses and
if (card.lapses >= lf and
(card.lapses-lf) % (max(lf/2, 1)) == 0):
# add a leech tag
f = card.note()