mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
make sure we don't reduce mid down to 0 on very old anki decks
This commit is contained in:
parent
d3f0c84517
commit
6ff5c3b2c2
1 changed files with 4 additions and 2 deletions
|
@ -341,8 +341,10 @@ insert or replace into col select id, cast(created as int), :t,
|
|||
mods = {}
|
||||
for row in db.all(
|
||||
"select id, name from models"):
|
||||
# use only first 31 bits
|
||||
t = abs(row[0]) >> 32
|
||||
# use only first 31 bits if not old anki id
|
||||
t = abs(row[0])
|
||||
if t > 4294967296:
|
||||
t >>= 32
|
||||
m = anki.models.defaultModel.copy()
|
||||
m['id'] = t
|
||||
m['name'] = row[1]
|
||||
|
|
Loading…
Reference in a new issue