mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
canonify tags when importing
This commit is contained in:
parent
9fe28df5dc
commit
e50ccf22e5
1 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,7 @@ from anki.facts import factsTable, fieldsTable
|
|||
from anki.lang import _
|
||||
from anki.utils import genID, canonifyTags
|
||||
from anki.errors import *
|
||||
from anki.utils import canonifyTags
|
||||
|
||||
# Base importer
|
||||
##########################################################################
|
||||
|
@ -233,8 +234,9 @@ where factId in (%s)""" % ",".join([str(s) for s in factIds]))
|
|||
else:
|
||||
self.uniqueCache[self.mapping[n].id][card.fields[n]] = 1
|
||||
if fields:
|
||||
card.tags += u"Import: duplicate, Duplicate: " + (
|
||||
card.tags += u",Import: duplicate, Duplicate: " + (
|
||||
"+".join(fields))
|
||||
card.tags = canonifyTags(card.tags)
|
||||
return True
|
||||
|
||||
# Export modules
|
||||
|
|
Loading…
Reference in a new issue