🐛 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:
parent
094fe2cc0d
commit
5a70aa04dd
1 changed files with 2 additions and 1 deletions
|
|
@ -129,8 +129,9 @@ class Vertex:
|
||||||
_value = value.get("value")
|
_value = value.get("value")
|
||||||
if isinstance(_value, list):
|
if isinstance(_value, list):
|
||||||
params[key] = {
|
params[key] = {
|
||||||
item["key"]: item["value"]
|
k: v
|
||||||
for item in value.get("value", [])
|
for item in value.get("value", [])
|
||||||
|
for k, v in item.items()
|
||||||
}
|
}
|
||||||
elif isinstance(_value, dict):
|
elif isinstance(_value, dict):
|
||||||
params[key] = _value
|
params[key] = _value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue