fix error exporting v2 collection when translations don't match

https://forums.ankiweb.net/t/utf8-error-in-importing-deck/4430/13
This commit is contained in:
Damien Elmes 2020-11-11 15:19:59 +10:00
parent 8a2cd15fd6
commit fd5815653f

View File

@ -380,7 +380,7 @@ class AnkiPackageExporter(AnkiExporter):
path = namedtmp("dummy.anki2") path = namedtmp("dummy.anki2")
c = Collection(path) c = Collection(path)
n = c.newNote() n = c.newNote()
n[_("Front")] = "This file requires a newer version of Anki." n.fields[0] = "This file requires a newer version of Anki."
c.addNote(n) c.addNote(n)
c.save() c.save()
c.close(downgrade=True) c.close(downgrade=True)