sortCards() when there are no new cards should do nothing

This commit is contained in:
Damien Elmes 2011-05-04 16:37:31 +09:00
parent a65f241258
commit 6885d89b65

View file

@ -810,6 +810,9 @@ queue = 2 %s and due <= :lim order by %s limit %d""" % (
fids = self.deck.db.list(
("select distinct fid from cards where type = 0 and id in %s "
"order by fid") % scids)
if not fids:
# no new cards
return
# determine fid ordering
due = {}
if shuffle: