diff --git a/pylib/anki/stats.py b/pylib/anki/stats.py index 62474c4b7..2fc3363a0 100644 --- a/pylib/anki/stats.py +++ b/pylib/anki/stats.py @@ -1123,7 +1123,10 @@ $(function () { if by == "review": t = self.col.db.scalar("select id from revlog %s order by id limit 1" % lim) elif by == "add": - lim = "where did in %s" % ids2str(self.col.decks.active()) + if self.wholeCollection: + lim = "" + else: + lim = "where did in %s" % ids2str(self.col.decks.active()) t = self.col.db.scalar("select id from cards %s order by id limit 1" % lim) if not t: period = 1