fixes error in dict_merge when merging list value (#35461)

This commit is contained in:
Peter Sprygada 2018-01-29 21:45:35 -05:00 committed by GitHub
parent 359ff19484
commit 2f7d207d7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -284,7 +284,11 @@ def dict_merge(base, other):
if key in other:
item = other.get(key)
if item is not None:
combined[key] = list(set(chain(value, item)))
try:
combined[key] = list(set(chain(value, item)))
except TypeError:
value.extend([i for i in item if i not in value])
combined[key] = value
else:
combined[key] = item
else: