make sure we move reviews back to original deck

This commit is contained in:
Damien Elmes 2012-03-12 12:33:46 +09:00
parent 324861a946
commit f4e962aa58
2 changed files with 6 additions and 0 deletions

View file

@ -650,6 +650,10 @@ did = ? and queue = 2 and due <= ? %s limit ?""" % order,
# then the rest
card.factor = max(1300, card.factor+[-150, 0, 150][ease-2])
card.due = self.today + card.ivl
if card.odid:
card.did = card.odid
card.odid = 0
card.odue = 0
def _logRev(self, card, ease):
def log():

View file

@ -531,6 +531,8 @@ def test_cram():
# should be able to answer it
c = d.sched.getCard()
d.sched.answerCard(c, 4)
# it should have been moved back to the original deck
assert c.did == 1
def test_adjIvl():
d = getEmptyDeck()