mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
make sure cards are tagged correctly when importing tags
This commit is contained in:
parent
19698d6256
commit
e9e5994248
1 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ all but one card template."""))
|
|||
try:
|
||||
idx = self.mapping.index(0)
|
||||
for c in cards:
|
||||
c.tags = c.fields[idx]
|
||||
c.tags += " " + c.fields[idx]
|
||||
except ValueError:
|
||||
pass
|
||||
# add facts
|
||||
|
@ -136,7 +136,7 @@ all but one card template."""))
|
|||
factIds = [genID() for n in range(len(cards))]
|
||||
self.deck.s.execute(factsTable.insert(),
|
||||
[{'modelId': self.model.id,
|
||||
'tags': canonifyTags(self.tagsToAdd + "," + cards[n].tags),
|
||||
'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