From d7e452de1f40869769c4d47d3f9bc20f03c3a53e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 13 Nov 2013 08:33:54 +0900 Subject: [PATCH] fix note types with missing reqs --- anki/collection.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/anki/collection.py b/anki/collection.py index f04ab3eaf..4f23d765e 100644 --- a/anki/collection.py +++ b/anki/collection.py @@ -695,6 +695,10 @@ select id from notes where mid not in """ + ids2str(self.models.ids())) self.remNotes(ids) # for each model for m in self.models.all(): + # model with missing req specification + if 'req' not in m: + self.models._updateRequired(m) + problems.append(_("Fixed note type: %s") % m['name']) # cards with invalid ordinal if m['type'] == MODEL_STD: ids = self.db.list("""