Fixed node properties
This commit is contained in:
@@ -51,9 +51,11 @@ def get_all_tanks(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['elevation'] = float(row['elevation'])
|
||||
d['init_level'] = float(row['init_level'])
|
||||
d['min_level'] = float(row['min_level'])
|
||||
@@ -62,7 +64,7 @@ def get_all_tanks(name: str) -> list[dict[str, Any]]:
|
||||
d['min_vol'] = float(row['min_vol'])
|
||||
d['vol_curve'] = str(row['vol_curve']) if row['vol_curve'] != None else None
|
||||
d['overflow'] = str(row['overflow']) if row['overflow'] != 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