🐛 fix(process.py): fix conditional statement to check if "nodes" is in graph_data

The conditional statement was checking if "nodes" is in "graph_data['data']" instead of checking if "nodes" is in "graph_data". This fix ensures that the correct data is processed and avoids potential errors.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-16 19:06:46 -03:00
commit fee54b817b

View file

@ -179,7 +179,7 @@ def process_tweaks(graph_data: Dict, tweaks: Dict):
# the dict of tweaks contains the name of a certain parameter and the value to be tweaked
# We need to process the graph data to add the tweaks
if "data" not in graph_data or "nodes" in graph_data["data"]:
if "data" not in graph_data and "nodes" in graph_data:
nodes = graph_data["nodes"]
else:
nodes = graph_data["data"]["nodes"]