From d06dccad320f2212efa5a540cdd1e1d4c7b182e9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 14 Feb 2012 12:27:17 +0900 Subject: [PATCH] deck list counts should be reps not cards, to match study screen --- anki/sched.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/anki/sched.py b/anki/sched.py index 524f160b2..4dcfff3f0 100644 --- a/anki/sched.py +++ b/anki/sched.py @@ -506,9 +506,9 @@ where queue = 1 and type = 2 def _lrnForDeck(self, did): return self.col.db.scalar( """ -select count() from -(select 1 from cards where did = ? and queue = 1 and due < ? limit ?)""", - did, intTime() + self.col.conf['collapseTime'], self.reportLimit) +select sum(left) from +(select left from cards where did = ? and queue = 1 and due < ? limit ?)""", + did, intTime() + self.col.conf['collapseTime'], self.reportLimit) or 0 # Reviews ##########################################################################