1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#8564: Fix deepmerge logic to allow nullifying dicts

This commit is contained in:
jeremystretch
2022-02-11 15:22:50 -05:00
parent a4ca585ef2
commit e1ef911d40

View File

@ -183,7 +183,7 @@ def deepmerge(original, new):
"""
merged = OrderedDict(original)
for key, val in new.items():
if key in original and isinstance(original[key], dict) and isinstance(val, dict):
if key in original and isinstance(original[key], dict) and val and isinstance(val, dict):
merged[key] = deepmerge(original[key], val)
else:
merged[key] = val