don't include (shared) in shared deck models

This commit is contained in:
Damien Elmes 2011-12-15 11:53:41 +09:00
parent 19435068bb
commit 9187255630

View file

@ -121,8 +121,9 @@ class Anki2Importer(Importer):
# if we're importing with a prefix, make the model default to it
if self.deckPrefix:
src['did'] = self.dst.decks.current()['id']
# and give it a unique name
src['name'] += " (%s)" % self.deckPrefix
# and give it a unique name if it's not a shared deck
if self.deckPrefix != "shared":
src['name'] += " (%s)" % self.deckPrefix
# make sure to bump usn
self.dst.models.save(src)
self._modelMap[mid] = mid