Fix #940680 (Private bug)

This commit is contained in:
Kovid Goyal 2012-02-25 09:58:23 +05:30
parent 8e79ba6893
commit 48a058b434

View File

@ -537,7 +537,12 @@ class Metadata(object):
if meta['datatype'] == 'text' and meta['is_multiple']: if meta['datatype'] == 'text' and meta['is_multiple']:
# Case-insensitive but case preserving merging # Case-insensitive but case preserving merging
lotags = [t.lower() for t in other_tags] lotags = [t.lower() for t in other_tags]
try:
lstags = [t.lower() for t in self_tags] lstags = [t.lower() for t in self_tags]
except TypeError:
# Happens if x is not a text, is_multiple field
# on self
lstags = []
ot, st = map(frozenset, (lotags, lstags)) ot, st = map(frozenset, (lotags, lstags))
for t in st.intersection(ot): for t in st.intersection(ot):
sidx = lstags.index(t) sidx = lstags.index(t)