mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
update position on integrity check
This commit is contained in:
parent
8a6e9945b2
commit
dd9d9f4223
1 changed files with 3 additions and 0 deletions
|
@ -574,6 +574,9 @@ select id from notes where id not in (select distinct nid from cards)""")
|
|||
# field cache
|
||||
for m in self.models.all():
|
||||
self.updateFieldCache(self.models.nids(m))
|
||||
# new card position
|
||||
self.conf['nextPos'] = self.db.scalar(
|
||||
"select max(due)+1 from cards where type = 0") or 0
|
||||
# and finally, optimize
|
||||
self.optimize()
|
||||
newSize = os.stat(self.path)[stat.ST_SIZE]
|
||||
|
|
Loading…
Reference in a new issue