mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
add card tags to fact
This commit is contained in:
parent
320d1fa758
commit
1e98f8bf81
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ import time
|
|||
from anki.cards import cardsTable
|
||||
from anki.facts import factsTable, fieldsTable
|
||||
from anki.lang import _
|
||||
from anki.utils import genID
|
||||
from anki.utils import genID, canonifyTags
|
||||
from anki.errors import *
|
||||
|
||||
# Base importer
|
||||
|
@ -121,7 +121,7 @@ all but one card model."""))
|
|||
factIds = [genID() for n in range(len(cards))]
|
||||
self.deck.s.execute(factsTable.insert(),
|
||||
[{'modelId': self.model.id,
|
||||
'tags': self.tagsToAdd,
|
||||
'tags': canonifyTags(self.tagsToAdd + "," + cards[n].tags),
|
||||
'id': factIds[n]} for n in range(len(cards))])
|
||||
self.deck.factCount += len(factIds)
|
||||
self.deck.s.execute("""
|
||||
|
|
Loading…
Reference in a new issue