mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
make sure we match a given model even when given a string
This commit is contained in:
parent
a68366b5c4
commit
61a7d6d79e
1 changed files with 1 additions and 0 deletions
|
@ -396,6 +396,7 @@ class SyncTools(object):
|
|||
|
||||
def getModel(self, id, create=True):
|
||||
"Return a local model with same ID, or create."
|
||||
id = int(id)
|
||||
for l in self.deck.models:
|
||||
if l.id == id:
|
||||
return l
|
||||
|
|
Loading…
Reference in a new issue