From e9e5994248068e88ffc2d47a78152de5c0dfb8a8 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 28 Mar 2009 14:32:38 +0900 Subject: [PATCH] make sure cards are tagged correctly when importing tags --- anki/importing/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anki/importing/__init__.py b/anki/importing/__init__.py index b7c3399a7..fb0c5d110 100644 --- a/anki/importing/__init__.py +++ b/anki/importing/__init__.py @@ -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("""