Cast template deck ID before checking the decks
Cast template deck ID before checking the decks

The keys of `self.decks.decks` are unicode keys whereas `template['did']`
is an integer, so `template['did'] in self.decks.decks` always fails.

Stvad/anki,jkitching/anki