Fix merging of compose files when network has None config

Signed-off-by: Michael Irwin <mikesir87@gmail.com>

Resolves #6525
This commit is contained in:
Michael Irwin 2019-03-05 10:17:09 -05:00 committed by Ulysses Souza
parent 0fdb9783cd
commit 3fae0119ca
1 changed files with 1 additions and 1 deletions

View File

@ -1193,7 +1193,7 @@ def merge_networks(base, override):
base = {k: {} for k in base} if isinstance(base, list) else base
override = {k: {} for k in override} if isinstance(override, list) else override
for network_name in all_network_names:
md = MergeDict(base.get(network_name, {}), override.get(network_name, {}))
md = MergeDict(base.get(network_name) or {}, override.get(network_name) or {})
md.merge_field('aliases', merge_unique_items_lists, [])
md.merge_field('link_local_ips', merge_unique_items_lists, [])
md.merge_scalar('priority')