From a111537c26e02699d8b1b1f36cdbf383b0e75f6f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 15 Mar 2009 06:43:45 +0900 Subject: [PATCH] fix refs to reviewHistory's id --- anki/stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anki/stats.py b/anki/stats.py index d319d0c3d..7509b870a 100644 --- a/anki/stats.py +++ b/anki/stats.py @@ -437,7 +437,7 @@ and priority > 0""", cutoff=cutoff) or 0) / float(period) def getPastWorkloadPeriod(self, period): cutoff = time.time() - 86400 * period return (self.deck.s.scalar(""" -select count(id) from reviewHistory +select count(*) from reviewHistory where time > :cutoff""", cutoff=cutoff) or 0) / float(period) def getNewPeriod(self, period): @@ -449,7 +449,7 @@ where created > :cutoff""", cutoff=cutoff) or 0) def getFirstPeriod(self, period): cutoff = time.time() - 86400 * period return (self.deck.s.scalar(""" -select count(id) from reviewHistory +select count(*) from reviewHistory where reps = 1 and time > :cutoff""", cutoff=cutoff) or 0) # Kanji stats