mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
if updating priorities results in a suspend, update due counts
This commit is contained in:
parent
961db76e63
commit
f32f96fb53
1 changed files with 4 additions and 2 deletions
|
@ -811,9 +811,11 @@ group by cardTags.cardId""" % ids2str(cardIds))
|
|||
self.s.statements(
|
||||
"update cards set priority = :pri %s where id = :id" % extra,
|
||||
[{'id': c[0], 'pri': c[1], 'm': time.time()} for c in cards])
|
||||
self.s.execute(
|
||||
cnt = self.s.execute(
|
||||
"update cards set isDue = 0 where type in (0,1,2) and "
|
||||
"priority = 0 and isDue = 1")
|
||||
"priority = 0 and isDue = 1").rowcount
|
||||
if cnt:
|
||||
self.rebuildCounts(full=False)
|
||||
|
||||
def updatePriority(self, card):
|
||||
"Update priority on a single card."
|
||||
|
|
Loading…
Reference in a new issue