mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -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.cards import cardsTable
|
||||||
from anki.facts import factsTable, fieldsTable
|
from anki.facts import factsTable, fieldsTable
|
||||||
from anki.lang import _
|
from anki.lang import _
|
||||||
from anki.utils import genID
|
from anki.utils import genID, canonifyTags
|
||||||
from anki.errors import *
|
from anki.errors import *
|
||||||
|
|
||||||
# Base importer
|
# Base importer
|
||||||
|
@ -121,7 +121,7 @@ all but one card model."""))
|
||||||
factIds = [genID() for n in range(len(cards))]
|
factIds = [genID() for n in range(len(cards))]
|
||||||
self.deck.s.execute(factsTable.insert(),
|
self.deck.s.execute(factsTable.insert(),
|
||||||
[{'modelId': self.model.id,
|
[{'modelId': self.model.id,
|
||||||
'tags': self.tagsToAdd,
|
'tags': canonifyTags(self.tagsToAdd + "," + cards[n].tags),
|
||||||
'id': factIds[n]} for n in range(len(cards))])
|
'id': factIds[n]} for n in range(len(cards))])
|
||||||
self.deck.factCount += len(factIds)
|
self.deck.factCount += len(factIds)
|
||||||
self.deck.s.execute("""
|
self.deck.s.execute("""
|
||||||
|
|
Loading…
Reference in a new issue