From 236a6071d4fab22940450ea073e78b834ebf77ee Mon Sep 17 00:00:00 2001 From: abdo Date: Thu, 15 Oct 2020 15:14:55 +0300 Subject: [PATCH] Save importing model in any case https://forums.ankiweb.net/t/bug-notes-are-imported-to-the-wrong-deck-in-certain-cases/4318 --- qt/aqt/importing.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qt/aqt/importing.py b/qt/aqt/importing.py index 4ae7ff80a..bd2310bbf 100644 --- a/qt/aqt/importing.py +++ b/qt/aqt/importing.py @@ -189,9 +189,8 @@ you can enter it here. Use \\t to represent tab.""" self.importer.tagModified = self.frm.tagModified.text() self.mw.pm.profile["tagModified"] = self.importer.tagModified did = self.deck.selectedId() - if did != self.importer.model["did"]: - self.importer.model["did"] = did - self.mw.col.models.save(self.importer.model, updateReqs=False) + self.importer.model["did"] = did + self.mw.col.models.save(self.importer.model, updateReqs=False) self.mw.col.decks.select(did) self.mw.progress.start() self.mw.checkpoint(_("Import"))