Change type to v_type for valve

This commit is contained in:
DingZQ
2022-10-16 13:12:34 +08:00
parent d87d8243a6
commit 5bbcc1f728

View File

@@ -689,12 +689,12 @@ async def fast_get_valve_schema(network: str) -> dict[str, dict[str, Any]]:
return get_valve_schema(network)
@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,
'node1' : node1,
'node2' : node2,
'diameter' : diameter,
'type' : type,
'v_type' : type,
'setting' : setting,
'minor_loss' : minor_loss }