mirror of
https://github.com/ankitects/anki.git
synced 2025-11-07 13:17:12 -05:00
fix bug in rev ivl adjustment that could lead to 0 day interval
This commit is contained in:
parent
320bb7c82f
commit
4a3b190453
1 changed files with 2 additions and 5 deletions
|
|
@ -611,7 +611,7 @@ did in %s and queue = 2 and due <= :lim %s limit %d""" % (
|
||||||
# loop through possible due dates for an empty one
|
# loop through possible due dates for an empty one
|
||||||
for diff in range(1, leeway+1):
|
for diff in range(1, leeway+1):
|
||||||
# ensure we're due at least tomorrow
|
# ensure we're due at least tomorrow
|
||||||
if idealDue - diff >= 1 and (idealDue - diff) not in dues:
|
if idealIvl - diff >= 1 and (idealDue - diff) not in dues:
|
||||||
fudge = -diff
|
fudge = -diff
|
||||||
break
|
break
|
||||||
elif (idealDue + diff) not in dues:
|
elif (idealDue + diff) not in dues:
|
||||||
|
|
@ -749,10 +749,7 @@ your short-term review workload will become."""))
|
||||||
# early removal
|
# early removal
|
||||||
return self._graduatingIvl(card, conf, True) * 86400
|
return self._graduatingIvl(card, conf, True) * 86400
|
||||||
else:
|
else:
|
||||||
if card.queue == 0:
|
left = card.left - 1
|
||||||
left = self._startingLeft(card) - 1
|
|
||||||
else:
|
|
||||||
left = card.left - 1
|
|
||||||
if left <= 0:
|
if left <= 0:
|
||||||
# graduate
|
# graduate
|
||||||
return self._graduatingIvl(card, conf, False) * 86400
|
return self._graduatingIvl(card, conf, False) * 86400
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue