mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
make sure we don't import cards into a filtered deck
This commit is contained in:
parent
8eff5f3111
commit
89fd5cf6e5
1 changed files with 4 additions and 0 deletions
|
@ -231,6 +231,10 @@ class Anki2Importer(Importer):
|
|||
head += parent
|
||||
idInSrc = self.src.decks.id(head)
|
||||
self._did(idInSrc)
|
||||
# if target is a filtered deck, we'll need a new deck name
|
||||
deck = self.dst.decks.byName(name)
|
||||
if deck and deck['dyn']:
|
||||
name = "%s %d" % (name, intTime())
|
||||
# create in local
|
||||
newid = self.dst.decks.id(name)
|
||||
# pull conf over
|
||||
|
|
Loading…
Reference in a new issue