Include links property

This commit is contained in:
wqy
2022-09-22 21:45:25 +08:00
parent 90f02752e9
commit 9905d7f022
2 changed files with 3 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ def set_reservoir_coord(name: str, id: str, x: float, y: float) -> ChangeSet:
def get_reservoir_property_names(name: str) -> list[str]:
return ['head', 'pattern', 'coord']
return ['head', 'pattern', 'coord', 'links']
def get_reservoir_properties(name: str, id: str) -> dict[str, Any] | None:

View File

@@ -100,7 +100,7 @@ def set_tank_coord(name: str, id: str, x: float, y: float) -> ChangeSet:
def get_tank_property_names(name: str) -> list[str]:
return ['elevation', 'init_level', 'min_level', 'max_level', 'diameter', 'min_vol', 'vol_curve', 'overflow', 'coord']
return ['elevation', 'init_level', 'min_level', 'max_level', 'diameter', 'min_vol', 'vol_curve', 'overflow', 'coord', 'links']
def get_tank_properties(name: str, id: str) -> dict[str, Any] | None:
@@ -118,4 +118,5 @@ def get_tank_properties(name: str, id: str) -> dict[str, Any] | None:
ps['vol_curve'] = row['vol_curve'] if row != None and row['vol_curve'] != None else None
ps['overflow'] = row['overflow'] if row != None and row['overflow'] != None else None
ps['coord'] = get_node_coord(name, id)
ps['links'] = get_node_links(name, id)
return ps