Fix default value handling in merge_dicts()

This commit is contained in:
clearml 2024-12-26 18:58:24 +02:00
parent fc1abbab0b
commit a26860e79f

View File

@ -14,7 +14,7 @@ def merge_dicts(dict1, dict2, custom_merge_func=None):
return dict2
for k in dict2:
if k in dict1:
res = None
res = _not_set
if custom_merge_func:
res = custom_merge_func(k, dict1[k], dict2[k], _not_set)
dict1[k] = merge_dicts(dict1[k], dict2[k], custom_merge_func) if res is _not_set else res