mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
don't mod schema when adding new models
This commit is contained in:
parent
eac9a00b22
commit
fae153c2af
1 changed files with 4 additions and 0 deletions
|
@ -273,6 +273,10 @@ select id from cards where nid in (select id from notes where mid = ?)""",
|
|||
f['ord'] = c
|
||||
|
||||
def _transformFields(self, m, fn):
|
||||
if not self.col.db.scalar(
|
||||
"select 1 from notes where mid = ? limit 1", m['id']):
|
||||
# don't bump schema for a new model
|
||||
return
|
||||
self.col.modSchema()
|
||||
r = []
|
||||
for (id, flds) in self.col.db.execute(
|
||||
|
|
Loading…
Reference in a new issue