use cardLimit() in cardsDueBy(), not just earliestTime()

This commit is contained in:
Damien Elmes 2011-01-09 15:12:17 +09:00
parent 82231a71b2
commit 2ca1627add

View file

@ -1159,9 +1159,11 @@ limit 1""" % self.delay0))
def cardsDueBy(self, time): def cardsDueBy(self, time):
"Number of cards due at TIME. Ignore new cards" "Number of cards due at TIME. Ignore new cards"
return self.s.scalar(""" return self.s.scalar(
select count(id) from cards where combinedDue < :time self.cardLimit(
and type between 0 and 1""", time=time) "revActive", "revInactive",
"select count(*) from cards c where type between 0 and 1 "
"and combinedDue < :lim"), lim=time)
def deckFinishedMsg(self): def deckFinishedMsg(self):
spaceSusp = "" spaceSusp = ""