Fix merge_nested_dicts_with_renaming function
This commit is contained in:
parent
9b41432c96
commit
b5c27724a6
1 changed files with 5 additions and 8 deletions
|
|
@ -488,10 +488,10 @@ def merge_nested_dicts_with_renaming(dict1, dict2):
|
||||||
for key, value in dict2.items():
|
for key, value in dict2.items():
|
||||||
if key in dict1 and isinstance(value, dict) and isinstance(dict1.get(key), dict):
|
if key in dict1 and isinstance(value, dict) and isinstance(dict1.get(key), dict):
|
||||||
for sub_key, sub_value in value.items():
|
for sub_key, sub_value in value.items():
|
||||||
if sub_key in dict1[key]:
|
# if sub_key in dict1[key]:
|
||||||
new_key = get_new_key(dict1[key], sub_key)
|
# new_key = get_new_key(dict1[key], sub_key)
|
||||||
dict1[key][new_key] = sub_value
|
# dict1[key][new_key] = sub_value
|
||||||
else:
|
# else:
|
||||||
dict1[key][sub_key] = sub_value
|
dict1[key][sub_key] = sub_value
|
||||||
else:
|
else:
|
||||||
dict1[key] = value
|
dict1[key] = value
|
||||||
|
|
@ -555,6 +555,3 @@ def create_and_validate_component(code: str) -> CustomComponent:
|
||||||
component = CustomComponent(code=code)
|
component = CustomComponent(code=code)
|
||||||
component.validate()
|
component.validate()
|
||||||
return component
|
return component
|
||||||
return component
|
|
||||||
return component
|
|
||||||
return component
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue