From 5bbcc1f728e291033ca941d941e88d0717f4513c Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sun, 16 Oct 2022 13:12:34 +0800 Subject: [PATCH] Change type to v_type for valve --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 4878554..376933b 100644 --- a/main.py +++ b/main.py @@ -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 }