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

Closes #9896: Discontinue arbitrary use of OrderedDict

This commit is contained in:
jeremystretch
2022-08-01 16:51:44 -04:00
parent 562769fb89
commit 29a611c729
9 changed files with 65 additions and 78 deletions

View File

@ -1,7 +1,6 @@
import datetime
import decimal
import json
from collections import OrderedDict
from decimal import Decimal
from itertools import count, groupby
@ -218,7 +217,7 @@ def deepmerge(original, new):
"""
Deep merge two dictionaries (new into original) and return a new dict
"""
merged = OrderedDict(original)
merged = dict(original)
for key, val in new.items():
if key in original and isinstance(original[key], dict) and val and isinstance(val, dict):
merged[key] = deepmerge(original[key], val)