diff --git a/pylib/anki/stdmodels.py b/pylib/anki/stdmodels.py index 8d887b263..a767d802e 100644 --- a/pylib/anki/stdmodels.py +++ b/pylib/anki/stdmodels.py @@ -101,8 +101,6 @@ def addClozeModel(col) -> NoteType: txt = _("Text") fm = mm.newField(txt) mm.addField(m, fm) - fm = mm.newField(_("Extra")) - mm.addField(m, fm) t = mm.newTemplate(_("Cloze")) fmt = "{{cloze:%s}}" % txt m[ @@ -116,7 +114,7 @@ def addClozeModel(col) -> NoteType: color: lightblue; }""" t["qfmt"] = fmt - t["afmt"] = fmt + "
\n{{%s}}" % _("Extra") + t["afmt"] = fmt mm.addTemplate(m, t) mm.add(m) return m diff --git a/pylib/tests/test_models.py b/pylib/tests/test_models.py index 177579f4e..f07d51eef 100644 --- a/pylib/tests/test_models.py +++ b/pylib/tests/test_models.py @@ -331,6 +331,7 @@ def test_modelChange(): # back the other way, with deletion of second ord deck.models.remTemplate(basic, basic["tmpls"][1]) assert deck.db.scalar("select count() from cards where nid = ?", f.id) == 2 + map = {0: 0} deck.models.change(cloze, [f.id], basic, map, map) assert deck.db.scalar("select count() from cards where nid = ?", f.id) == 1