mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixes error in dict_merge when merging list value (#35461)
This commit is contained in:
parent
359ff19484
commit
2f7d207d7a
1 changed files with 5 additions and 1 deletions
|
@ -284,7 +284,11 @@ def dict_merge(base, other):
|
||||||
if key in other:
|
if key in other:
|
||||||
item = other.get(key)
|
item = other.get(key)
|
||||||
if item is not None:
|
if item is not None:
|
||||||
|
try:
|
||||||
combined[key] = list(set(chain(value, item)))
|
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:
|
else:
|
||||||
combined[key] = item
|
combined[key] = item
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue