diff --git a/anki/find.py b/anki/find.py index c812b3d96..bcd719b20 100644 --- a/anki/find.py +++ b/anki/find.py @@ -496,7 +496,9 @@ def fieldNames(col, downcase=True): def findDupes(col, fieldName, search=""): # limit search to notes with applicable field name - search = "(%s) '%s:*'" % (search, fieldName) + if search: + search = "("+search+") " + search += "'%s:*'" % fieldName # go through notes vals = {} dupes = []