refactor: Fix bug in Vertex class when checking if param is a list
Update the Vertex class in base.py to fix a bug in the logic for checking if a parameter is a list. The current implementation only checks if the "list" key exists in the template_dict, but it should also check if the value of the "list" key is truthy. This change ensures that the correct condition is used to determine if a parameter is a list, preventing potential overwriting of params with the same name but different target_id.
This commit is contained in:
parent
00c83d4b9b
commit
bb847db2b8
1 changed files with 1 additions and 1 deletions
|
|
@ -302,7 +302,7 @@ class Vertex:
|
|||
# We check this to make sure params with the same name but different target_id
|
||||
# don't get overwritten
|
||||
if param_key in template_dict and edge.target_id == self.id:
|
||||
if template_dict[param_key]["list"]:
|
||||
if template_dict[param_key].get("list"):
|
||||
if param_key not in params:
|
||||
params[param_key] = []
|
||||
params[param_key].append(self.graph.get_vertex(edge.source_id))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue