Skip to content

Commit

Permalink
fix: update pathfinder_status logic in post_graph_traversal
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Aug 10, 2024
1 parent 7d7ac99 commit efa8724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/graphtraversal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def post_graph_traversal(request):
time_taken = datetime.now().timestamp() - current_time
print(f"path: {path}")
print(f"node_order: {node_order}")
pathfinder_status: str = "success" if path is not None else "failure"
pathfinder_status: str = "success" if len(path) == 0 else "failure"

# Serialize the list of dictionaries to a JSON string
path_dicts = [node.to_dict() for node in path]
Expand Down

0 comments on commit efa8724

Please sign in to comment.