From 1e2d88dccf5ebd4253126c89f126d5bbe6752f30 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 24 Oct 2010 11:47:47 +0900 Subject: [PATCH] make sure to consider active tags when calculating next due card --- anki/deck.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/anki/deck.py b/anki/deck.py index 747d36f25..0b5687047 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -992,8 +992,10 @@ This may be in the past if the deck is not finished. If the deck has no (enabled) cards, return None. Ignore new cards.""" return self.s.scalar(""" -select combinedDue from cards where type in (0, 1) -order by combinedDue limit 1""") +select combinedDue from cards where type in (0,1) +%s +order by combinedDue +limit 1""" % (self.cardLimit("revActive", "revInactive"))) def earliestTimeStr(self, next=None): """Return the relative time to the earliest card as a string."""