mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
reschedule should not operate on filtered/suspended/buried
this should fix some issues with rescheduled cards ending up in an invalid state
This commit is contained in:
parent
d36655a8c7
commit
79ed57a445
1 changed files with 3 additions and 3 deletions
|
@ -1295,8 +1295,8 @@ and (queue=0 or (queue=2 and due<=?))""",
|
|||
def forgetCards(self, ids):
|
||||
"Put cards at the end of the new queue."
|
||||
self.col.db.execute(
|
||||
"update cards set type=0,queue=0,ivl=0,odue=0,due=0,factor=? where id in "+
|
||||
ids2str(ids), 2500)
|
||||
"update cards set type=0,queue=0,ivl=0,due=0,factor=? where odid=0 "
|
||||
"and queue >= 0 and id in "+ids2str(ids), 2500)
|
||||
pmax = self.col.db.scalar(
|
||||
"select max(due) from cards where type=0") or 0
|
||||
# takes care of mod + usn
|
||||
|
@ -1314,7 +1314,7 @@ and (queue=0 or (queue=2 and due<=?))""",
|
|||
self.removeLrn(ids)
|
||||
self.col.db.executemany("""
|
||||
update cards set type=2,queue=2,ivl=:ivl,due=:due,
|
||||
usn=:usn, mod=:mod, factor=:fact where id=:id and odid=0""",
|
||||
usn=:usn, mod=:mod, factor=:fact where id=:id and odid=0 and queue >=0""",
|
||||
d)
|
||||
|
||||
def resetCards(self, ids):
|
||||
|
|
Loading…
Reference in a new issue