Damien Elmes 2018-07-27 14:59:45 +10:00
parent eb44584b29
commit a728595c1d
2 changed files with 2 additions and 7 deletions

View file

@ -856,10 +856,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
return delay
def _lapseIvl(self, card, conf):
due = card.odue or card.due
elapsed = card.ivl - (due - self.today)
ivl = min(elapsed, card.ivl)
ivl = max(1, conf['minInt'], ivl*conf['mult'])
ivl = max(1, conf['minInt'], card.ivl*conf['mult'])
return ivl
def _rescheduleRev(self, card, ease, early):

View file

@ -1107,10 +1107,8 @@ def test_failmult():
c = d.sched.getCard()
d.sched.answerCard(c, 1)
assert c.ivl == 50
# failing again, the actual elapsed interval is 0,
# so the card is reset to new
d.sched.answerCard(c, 1)
assert c.ivl == 1
assert c.ivl == 25
def test_moveVersions():
col = _getEmptyCol(schedVer=1)