Do not insert coordinate when get

This commit is contained in:
WQY\qiong
2023-03-24 20:56:51 +08:00
parent 069e9ac4c5
commit f44876427d
3 changed files with 3 additions and 6 deletions

View File

@@ -17,8 +17,7 @@ def get_junction(name: str, id: str) -> dict[str, Any]:
return {}
xy = get_node_coord(name, id)
if xy == {}:
write(name, f"insert into coordinates (node, coord) values ('{id}', '(0,0)');")
xy = get_node_coord(name, id)
xy = {'x': 0.0, 'y': 0.0}
d = {}
d['id'] = str(j['id'])
d['x'] = float(xy['x'])