find&replace should not be case sensitive on field

This commit is contained in:
Damien Elmes 2018-11-27 16:34:48 +10:00
parent 7b96e90db7
commit ea9d2e2d64

View File

@ -484,7 +484,7 @@ def findReplace(col, nids, src, dst, regex=False, field=None, fold=True):
if field: if field:
for m in col.models.all(): for m in col.models.all():
for f in m['flds']: for f in m['flds']:
if f['name'] == field: if f['name'].lower() == field.lower():
mmap[str(m['id'])] = f['ord'] mmap[str(m['id'])] = f['ord']
if not mmap: if not mmap:
return 0 return 0