From 6c6bd50c67974e977cd2295e07170d63f971407f Mon Sep 17 00:00:00 2001 From: DingZQ Date: Mon, 29 Aug 2022 23:11:30 +0800 Subject: [PATCH] Index of link should start from 1 --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index fbcf344..1421b11 100644 --- a/main.py +++ b/main.py @@ -128,7 +128,7 @@ async def fastapi_set_node_coord(network: str, node: str, x: int, y: int): async def fastapi_get_links(network: str): linkCount = get_count(network, LINK_COUNT) links = [] - for i in range(0, linkCount.value + 1): + for i in range(1, linkCount.value + 1): link_id = get_link_id(network, i) if link_id.error_code == 0: links.append(link_id.value)