mirror of
https://github.com/ankitects/anki.git
synced 2025-12-30 23:32:57 -05:00
refuse to open files created with newer schema version
This commit is contained in:
parent
2d79a92247
commit
46561876a1
1 changed files with 2 additions and 0 deletions
|
|
@ -40,6 +40,8 @@ def Collection(path, lock=True, server=False, sync=True, log=False):
|
|||
col = _Collection(db, server, log)
|
||||
if ver < SCHEMA_VERSION:
|
||||
_upgrade(col, ver)
|
||||
elif ver > SCHEMA_VERSION:
|
||||
raise Exception("This file requires a newer version of Anki.")
|
||||
elif create:
|
||||
# add in reverse order so basic is default
|
||||
addClozeModel(col)
|
||||
|
|
|
|||
Loading…
Reference in a new issue