mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
check the first field is mapped
This commit is contained in:
parent
a09cd3f7a0
commit
3fd1cf0158
1 changed files with 5 additions and 2 deletions
|
@ -130,7 +130,11 @@ you can enter it here. Use \\t to represent tab."""),
|
||||||
self.frm.autoDetect.setText(txt)
|
self.frm.autoDetect.setText(txt)
|
||||||
|
|
||||||
def doImport(self, update=False):
|
def doImport(self, update=False):
|
||||||
t = time.time()
|
self.importer.mapping = self.mapping
|
||||||
|
if not self.importer.mappingOk():
|
||||||
|
showWarning(
|
||||||
|
_("The first field of the note type must be mapped."))
|
||||||
|
return
|
||||||
deck = self.deck.text().strip()
|
deck = self.deck.text().strip()
|
||||||
if not deck:
|
if not deck:
|
||||||
deck = _("Default")
|
deck = _("Default")
|
||||||
|
@ -138,7 +142,6 @@ you can enter it here. Use \\t to represent tab."""),
|
||||||
if did != self.importer.model['did']:
|
if did != self.importer.model['did']:
|
||||||
self.importer.model['did'] = did
|
self.importer.model['did'] = did
|
||||||
self.mw.col.models.save(self.importer.model)
|
self.mw.col.models.save(self.importer.model)
|
||||||
self.importer.mapping = self.mapping
|
|
||||||
self.mw.progress.start(immediate=True)
|
self.mw.progress.start(immediate=True)
|
||||||
self.mw.checkpoint(_("Import"))
|
self.mw.checkpoint(_("Import"))
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue