From b7d9935b99c86b5cf3a694948c52bc65e05916bd Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 25 May 2012 08:40:08 +0900 Subject: [PATCH] add bq/bafmt on upgrade --- anki/models.py | 1 - anki/storage.py | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/anki/models.py b/anki/models.py index a7e04d1af..a2320ad2a 100644 --- a/anki/models.py +++ b/anki/models.py @@ -60,7 +60,6 @@ defaultTemplate = { 'qfmt': "", 'afmt': "", 'did': None, - # added in beta 13 'bqfmt': "", 'bafmt': "", } diff --git a/anki/storage.py b/anki/storage.py index d60c25095..c1b74dff7 100644 --- a/anki/storage.py +++ b/anki/storage.py @@ -165,6 +165,11 @@ update cards set left = left + left*1000 where queue = 1""") del r['ivlfct'] r['maxIvl'] = 36500 col.decks.save(c) + for m in col.models.all(): + for t in m['tmpls']: + t['bqfmt'] = '' + t['bafmt'] = '' + col.models.save(m) col.db.execute("update col set ver = 11") def _upgradeClozeModel(col, m):