diff --git a/lib-python/anki/importing/noteimp.py b/lib-python/anki/importing/noteimp.py index e4b95dde0..eb11504cc 100644 --- a/lib-python/anki/importing/noteimp.py +++ b/lib-python/anki/importing/noteimp.py @@ -275,7 +275,7 @@ content in the text file to the correct fields.""" return [intTime(), self.col.usn(), n.fieldsStr, tags, id, n.fieldsStr, tags] elif self.tagModified: tags = self.col.db.scalar("select tags from notes where id = ?", id) - tagList = self.col.tags.split(tags) + self.tagModified.split(",") + tagList = self.col.tags.split(tags) + self.tagModified.split() tagList = self.col.tags.canonify(tagList) self.col.tags.register(tagList) tags = self.col.tags.join(tagList) diff --git a/lib-python/tests/test_importing.py b/lib-python/tests/test_importing.py index 9cafe817d..ae7406fc1 100644 --- a/lib-python/tests/test_importing.py +++ b/lib-python/tests/test_importing.py @@ -249,7 +249,7 @@ def test_tsv_tag_multiple_tags(): tf.flush() i = TextImporter(deck, tf.name) i.initMapping() - i.tagModified = "five,six" + i.tagModified = "five six" i.run() n.load()