mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
find&replace should ignore notes without provided field
This commit is contained in:
parent
933bee43a0
commit
ce86670c76
2 changed files with 6 additions and 3 deletions
|
@ -412,8 +412,12 @@ def findReplace(col, nids, src, dst, regex=False, field=None, fold=True):
|
|||
# does it match?
|
||||
sflds = splitFields(flds)
|
||||
if field:
|
||||
ord = mmap[str(mid)]
|
||||
sflds[ord] = repl(sflds[ord])
|
||||
try:
|
||||
ord = mmap[str(mid)]
|
||||
sflds[ord] = repl(sflds[ord])
|
||||
except KeyError:
|
||||
# note doesn't have that field
|
||||
continue
|
||||
else:
|
||||
for c in range(len(sflds)):
|
||||
sflds[c] = repl(sflds[c])
|
||||
|
|
|
@ -842,7 +842,6 @@ did = ?, queue = %s, due = ?, mod = ?, usn = ? where id = ?""" % queue, data)
|
|||
perDay=self.reportLimit
|
||||
)
|
||||
|
||||
|
||||
def _lapseConf(self, card):
|
||||
conf = self._cardConf(card)
|
||||
# normal deck
|
||||
|
|
Loading…
Reference in a new issue