fix sanityCheck2 bug

This commit is contained in:
Damien Elmes 2013-02-26 15:23:01 +09:00
parent 9642ce9337
commit 1efafedcaa

View File

@ -191,7 +191,7 @@ select count() from notes where id not in (select distinct nid from cards)"""):
for t in "cards", "notes", "revlog", "graves": for t in "cards", "notes", "revlog", "graves":
if self.col.db.scalar( if self.col.db.scalar(
"select count() from %s where usn = -1" % t): "select count() from %s where usn = -1" % t):
return "%t had usn = -1" % t return "%s had usn = -1" % t
for g in self.col.decks.all(): for g in self.col.decks.all():
if g['usn'] == -1: if g['usn'] == -1:
return "deck had usn = -1" return "deck had usn = -1"