From bcb9b533681bbd5c094d690c0b05583d68ac708b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 23 Aug 2012 17:07:41 +0900 Subject: [PATCH] ensure we return cards in created order when sorting --- anki/sched.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/sched.py b/anki/sched.py index 364a168a2..02644a4a1 100644 --- a/anki/sched.py +++ b/anki/sched.py @@ -1269,7 +1269,7 @@ and due >= ? and queue = 0""" % scids, now, self.col.usn(), shiftby, low) self.sortCards(cids, shuffle=True) def orderCards(self, did): - cids = self.col.db.list("select id from cards where did = ?", did) + cids = self.col.db.list("select id from cards where did = ? order by id", did) self.sortCards(cids) def resortConf(self, conf):