Change type to v_type for valve
This commit is contained in:
4
main.py
4
main.py
@@ -689,12 +689,12 @@ async def fast_get_valve_schema(network: str) -> dict[str, dict[str, Any]]:
|
|||||||
return get_valve_schema(network)
|
return get_valve_schema(network)
|
||||||
|
|
||||||
@app.post("/addvalve/")
|
@app.post("/addvalve/")
|
||||||
async def fastapi_add_valve(network: str, valve: str, node1: str, node2: str, diameter: float = 0, type: str = VALVES_TYPE_PRV, setting: float = 0, minor_loss: float = 0) -> ChangeSet:
|
async def fastapi_add_valve(network: str, valve: str, node1: str, node2: str, diameter: float = 0, v_type: str = VALVES_TYPE_PRV, setting: float = 0, minor_loss: float = 0) -> ChangeSet:
|
||||||
ps = { 'id' : valve,
|
ps = { 'id' : valve,
|
||||||
'node1' : node1,
|
'node1' : node1,
|
||||||
'node2' : node2,
|
'node2' : node2,
|
||||||
'diameter' : diameter,
|
'diameter' : diameter,
|
||||||
'type' : type,
|
'v_type' : type,
|
||||||
'setting' : setting,
|
'setting' : setting,
|
||||||
'minor_loss' : minor_loss }
|
'minor_loss' : minor_loss }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user