catch suspended new cards w/ wrong due number

https://anki.tenderapp.com/discussions/ankidesktop/29267-01
This commit is contained in:
Damien Elmes 2018-08-30 12:43:53 +10:00
parent d1a09d5ed1
commit ab57faf58e

View File

@ -838,7 +838,7 @@ select id from cards where odid > 0 and did in %s""" % ids2str(dids))
# new cards can't have a due position > 32 bits
self.db.execute("""
update cards set due = 1000000, mod = ?, usn = ? where due > 1000000
and queue = 0""", intTime(), self.usn())
and type = 0""", intTime(), self.usn())
# new card position
self.conf['nextPos'] = self.db.scalar(
"select max(due)+1 from cards where type = 0") or 0