diff --git a/anki/schedv2.py b/anki/schedv2.py index d95372a1e..60f4f404e 100644 --- a/anki/schedv2.py +++ b/anki/schedv2.py @@ -1056,14 +1056,11 @@ due = (case when odue>0 then odue else due end), odue = 0, odid = 0, usn = ? whe t = "n.id" elif o == DYN_REVADDED: t = "n.id desc" - elif o == DYN_DUE: - t = "c.due" elif o == DYN_DUEPRIORITY: t = "(case when queue=2 and due <= %d then (ivl / cast(%d-due+0.001 as real)) else 100000+due end)" % ( self.today, self.today) - else: - # if we don't understand the term, default to due order - t = "c.due" + else: # DYN_DUE or unknown + t = "c.due, c.ord" return t + " limit %d" % l def _moveToDyn(self, did, ids, start=-100000):