mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
if there are no cards to shift, don't try
This commit is contained in:
parent
7acdbfa9ae
commit
c4c1cdeb6b
1 changed files with 3 additions and 2 deletions
|
@ -809,8 +809,9 @@ where id = :id""", vals)
|
|||
"select min(due) from cards where due >= ? and type = 0 "
|
||||
"and id not in %s" % scids,
|
||||
start)
|
||||
shiftby = high - low + 1
|
||||
self.deck.db.execute("""
|
||||
if low is not None:
|
||||
shiftby = high - low + 1
|
||||
self.deck.db.execute("""
|
||||
update cards set mod=?, due=due+? where id not in %s
|
||||
and due >= ?""" % scids, now, shiftby, low)
|
||||
# reorder cards
|
||||
|
|
Loading…
Reference in a new issue