update all card priorities at once on add

This commit is contained in:
Damien Elmes 2009-05-09 03:25:24 +09:00
parent 9df4b3278f
commit bc7bdc24c4

View file

@ -979,8 +979,7 @@ where type = 2 and priority in (1,2,3,4)""") or 0
self.flushMod()
cards.append(card)
self.updateFactTags([fact.id])
for card in cards:
self.updatePriority(card)
self.updatePriorities([c.id for c in cards])
self.cardCount += len(cards)
self.newCount += len(cards)
# keep track of last used tags for convenience