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
|
# proceed
|
||||||
cards = []
|
cards = []
|
||||||
self.s.save(fact)
|
self.s.save(fact)
|
||||||
|
# update field cache
|
||||||
|
fact.setModified(True)
|
||||||
self.factCount += 1
|
self.factCount += 1
|
||||||
self.flushMod()
|
self.flushMod()
|
||||||
isRandom = self.newCardOrder == NEW_CARDS_RANDOM
|
isRandom = self.newCardOrder == NEW_CARDS_RANDOM
|
||||||
|
|
@ -2279,6 +2281,7 @@ where id = :id""", pending)
|
||||||
query += " id IN %s" % ids2str(cardIdList)
|
query += " id IN %s" % ids2str(cardIdList)
|
||||||
if showdistinct:
|
if showdistinct:
|
||||||
query += " group by factId"
|
query += " group by factId"
|
||||||
|
#print query, args
|
||||||
return self.s.column0(query, **args)
|
return self.s.column0(query, **args)
|
||||||
|
|
||||||
def findCardsWhere(self, query):
|
def findCardsWhere(self, query):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue