From f998fe9a49731cf568c05db65f6558044bfb4c72 Mon Sep 17 00:00:00 2001 From: Julian B Date: Tue, 21 Feb 2023 13:54:05 +0100 Subject: [PATCH] fix signal direction analysis for edges without path --- orm_importer/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orm_importer/utils.py b/orm_importer/utils.py index 50d6796..c837da9 100644 --- a/orm_importer/utils.py +++ b/orm_importer/utils.py @@ -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: