From 4c369ba6af40ef55058da81b6ade1189a77c56f9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 16 Mar 2012 19:08:13 +0900 Subject: [PATCH] make sure daysLate() works with review cards in a cram deck --- anki/sched.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anki/sched.py b/anki/sched.py index 3f7cfed00..6605130fa 100644 --- a/anki/sched.py +++ b/anki/sched.py @@ -687,7 +687,8 @@ did = ? and queue = 2 and due <= ? limit ?""", def _daysLate(self, card): "Number of days later than scheduled." - return max(0, self.today - card.due) + due = card.odue if card.odid else card.due + return max(0, self.today - due) def _updateRevIvl(self, card, ease): "Update CARD's interval, trying to avoid siblings."