mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
new cards can't have due # > 32 bits
This commit is contained in:
parent
3ffe47f5d6
commit
9b3364c1bb
1 changed files with 4 additions and 0 deletions
|
@ -670,6 +670,10 @@ select id from notes where id not in (select distinct nid from cards)""")
|
||||||
# field cache
|
# field cache
|
||||||
for m in self.models.all():
|
for m in self.models.all():
|
||||||
self.updateFieldCache(self.models.nids(m))
|
self.updateFieldCache(self.models.nids(m))
|
||||||
|
# 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())
|
||||||
# new card position
|
# new card position
|
||||||
self.conf['nextPos'] = self.db.scalar(
|
self.conf['nextPos'] = self.db.scalar(
|
||||||
"select max(due)+1 from cards where type = 0") or 0
|
"select max(due)+1 from cards where type = 0") or 0
|
||||||
|
|
Loading…
Reference in a new issue