Merge pull request #120 from corpulentcoffee/deck-override-fix

The new `template['did'] in self.decks.decks` check is always `False` against my installation/collection
This commit is contained in:
Damien Elmes 2016-03-04 21:58:23 +10:00
commit 16d74902e1

View File

@ -380,7 +380,7 @@ insert into cards values (?,?,?,?,?,?,0,0,?,0,0,0,0,0,0,0,0,"")""",
card.nid = note.id
card.ord = template['ord']
# Use template did (deck override) if valid, otherwise model did
if template['did'] and template['did'] in self.decks.decks:
if template['did'] and unicode(template['did']) in self.decks.decks:
card.did = template['did']
else:
card.did = note.model()['did']