Fixed node properties
This commit is contained in:
@@ -35,12 +35,14 @@ def get_all_reservoirs(name: str) -> list[dict[str, Any]]:
|
||||
result = []
|
||||
for row in rows:
|
||||
d = {}
|
||||
d['id'] = str(row['id'])
|
||||
d['x'] = float(row['x'])
|
||||
d['y'] = float(row['y'])
|
||||
id = str(row['id'])
|
||||
xy = get_node_coord(name, id)
|
||||
d['id'] = id
|
||||
d['x'] = float(xy['x'])
|
||||
d['y'] = float(xy['y'])
|
||||
d['head'] = float(row['head']) if row['head'] != None else None
|
||||
d['pattern'] = str(row['pattern']) if row['pattern'] != None else None
|
||||
d['links'] = get_node_links(name, row['id'])
|
||||
d['links'] = get_node_links(name, id)
|
||||
result.append(d)
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user