Index of link should start from 1
This commit is contained in:
2
main.py
2
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):
|
async def fastapi_get_links(network: str):
|
||||||
linkCount = get_count(network, LINK_COUNT)
|
linkCount = get_count(network, LINK_COUNT)
|
||||||
links = []
|
links = []
|
||||||
for i in range(0, linkCount.value + 1):
|
for i in range(1, linkCount.value + 1):
|
||||||
link_id = get_link_id(network, i)
|
link_id = get_link_id(network, i)
|
||||||
if link_id.error_code == 0:
|
if link_id.error_code == 0:
|
||||||
links.append(link_id.value)
|
links.append(link_id.value)
|
||||||
|
|||||||
Reference in New Issue
Block a user