mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
make sure we don't delete cloze notes in db check
This commit is contained in:
parent
8a06ab7bfe
commit
76926c953a
1 changed files with 3 additions and 0 deletions
|
@ -642,6 +642,9 @@ select id from notes where mid not in """ + ids2str(self.models.ids()))
|
|||
self.remNotes(ids)
|
||||
# cards with invalid ordinal
|
||||
for m in self.models.all():
|
||||
# ignore clozes
|
||||
if m['type'] != MODEL_STD:
|
||||
continue
|
||||
ids = self.db.list("""
|
||||
select id from cards where ord not in %s and nid in (
|
||||
select id from notes where mid = ?)""" %
|
||||
|
|
Loading…
Reference in a new issue