bury shouldn't touch suspended siblings

This commit is contained in:
Damien Elmes 2012-08-23 19:44:25 +09:00
parent bcb9b53368
commit 162ccdcc03

View file

@ -1184,10 +1184,11 @@ your short-term review workload will become."""))
def buryNote(self, nid): def buryNote(self, nid):
"Bury all cards for note until next session." "Bury all cards for note until next session."
self.col.setDirty() self.col.setDirty()
cids = self.col.db.list("select id from cards where nid = ?", nid) cids = self.col.db.list(
"select id from cards where nid = ? and queue >= 0", nid)
self.remFromDyn(cids) self.remFromDyn(cids)
self.removeFailed(cids) self.removeFailed(cids)
self.col.db.execute("update cards set queue = -2 where nid = ?", nid) self.col.db.execute("update cards set queue = -2 where id in "+ids2str(cids))
# Resetting # Resetting
########################################################################## ##########################################################################