mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
#8564: Fix deepmerge logic to allow nullifying dicts
This commit is contained in:
parent
a4ca585ef2
commit
e1ef911d40
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user