diff --git a/pylib/anki/sched.py b/pylib/anki/sched.py index 87b3c6f23..d92450070 100644 --- a/pylib/anki/sched.py +++ b/pylib/anki/sched.py @@ -1578,7 +1578,7 @@ and due >= ? and queue = 0""" self.sortCards(cids, shuffle=True) def orderCards(self, did): - cids = self.col.db.list("select id from cards where did = ? order by id", did) + cids = self.col.db.list("select id from cards where did = ? order by nid", did) self.sortCards(cids) def resortConf(self, conf): diff --git a/pylib/anki/schedv2.py b/pylib/anki/schedv2.py index a1733498f..598f386ff 100644 --- a/pylib/anki/schedv2.py +++ b/pylib/anki/schedv2.py @@ -1832,7 +1832,7 @@ and due >= ? and queue = 0""" self.sortCards(cids, shuffle=True) def orderCards(self, did: int) -> None: - cids = self.col.db.list("select id from cards where did = ? order by id", did) + cids = self.col.db.list("select id from cards where did = ? order by nid", did) self.sortCards(cids) def resortConf(self, conf) -> None: