diff --git a/qt/aqt/addcards.py b/qt/aqt/addcards.py index 067290342..7def6df53 100644 --- a/qt/aqt/addcards.py +++ b/qt/aqt/addcards.py @@ -144,7 +144,7 @@ class AddCards(QDialog): def onHistory(self) -> None: m = QMenu(self) for nid in self.history: - if self.mw.col.findNotes("nid:%s" % nid): + if self.mw.col.findNotes(self.col.search_string(nids=[nid])): note = self.mw.col.getNote(nid) fields = note.fields txt = htmlToTextLine(", ".join(fields)) @@ -162,7 +162,7 @@ class AddCards(QDialog): def editHistory(self, nid): browser = aqt.dialogs.open("Browser", self.mw) - browser.form.searchEdit.lineEdit().setText("nid:%d" % nid) + browser.form.searchEdit.lineEdit().setText(self.col.search_string(nids=[nid])) browser.onSearchActivated() def addNote(self, note) -> Optional[Note]: diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index e1e474e38..603c47d31 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -1705,7 +1705,7 @@ where id in %s""" t += ( """