From e1ef911d4043c6c03895638844e6e46702729a64 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 11 Feb 2022 15:22:50 -0500 Subject: [PATCH] #8564: Fix deepmerge logic to allow nullifying dicts --- netbox/utilities/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/utilities/utils.py b/netbox/utilities/utils.py index 31e57cd69..b1817b568 100644 --- a/netbox/utilities/utils.py +++ b/netbox/utilities/utils.py @@ -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