Index of link should start from 1

This commit is contained in:
DingZQ
2022-08-29 23:11:30 +08:00
parent 7f5b4c9d74
commit 6c6bd50c67

View File

@@ -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)