Skip to content

Commit

Permalink
fix signal direction analysis for edges without path
Browse files Browse the repository at this point in the history
  • Loading branch information
jeriox committed Feb 21, 2023
1 parent 0e17f75 commit f998fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orm_importer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def getSignalDirection(edge: Edge, ways: dict[str, List[Way]], path, signal_dire
if node_a in way._node_ids and node_b in way._node_ids:
edge_is_forward = way._node_ids.index(node_a) < way._node_ids.index(node_b)
break
elif node_a in way._node_ids and path[0] in way._node_ids:
elif node_a in way._node_ids and len(path) > 0 and path[0] in way._node_ids:
edge_is_forward = way._node_ids.index(node_a) < way._node_ids.index(path[0])
break
else:
Expand Down

0 comments on commit f998fe9

Please sign in to comment.