mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
make sure to update field cache when adding fact
This commit is contained in:
parent
c4a1f807ec
commit
ce82861357
1 changed files with 3 additions and 0 deletions
|
|
@ -1288,6 +1288,8 @@ and due < :now""", now=time.time())
|
|||
# proceed
|
||||
cards = []
|
||||
self.s.save(fact)
|
||||
# update field cache
|
||||
fact.setModified(True)
|
||||
self.factCount += 1
|
||||
self.flushMod()
|
||||
isRandom = self.newCardOrder == NEW_CARDS_RANDOM
|
||||
|
|
@ -2279,6 +2281,7 @@ where id = :id""", pending)
|
|||
query += " id IN %s" % ids2str(cardIdList)
|
||||
if showdistinct:
|
||||
query += " group by factId"
|
||||
#print query, args
|
||||
return self.s.column0(query, **args)
|
||||
|
||||
def findCardsWhere(self, query):
|
||||
|
|
|
|||
Loading…
Reference in a new issue