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 d532726adb
commit 4fb7fb07fd

View file

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