diff --git a/anki/models.py b/anki/models.py index 8aaf91b2d..411a349f1 100644 --- a/anki/models.py +++ b/anki/models.py @@ -142,7 +142,7 @@ class ModelManager(object): select id from cards where fid in (select id from facts where mid = ?)""", m['id'])) # then the model - del self.models[m['id']] + del self.models[str(m['id'])] self.save() # GUI should ensure last model is not deleted if current: