🐛 fix(base.py): fix the assignment of params[key] in Vertex class to correctly handle nested dictionaries and lists

The previous implementation was not correctly handling nested dictionaries and lists. This fix updates the assignment of params[key] to correctly handle nested dictionaries and lists by using a dictionary comprehension.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-19 11:28:01 -03:00
commit 5a70aa04dd

View file

@ -129,8 +129,9 @@ class Vertex:
_value = value.get("value")
if isinstance(_value, list):
params[key] = {
item["key"]: item["value"]
k: v
for item in value.get("value", [])
for k, v in item.items()
}
elif isinstance(_value, dict):
params[key] = _value