From 19cfd21e81af10510c97ed754c6a98025d583e84 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Tue, 2 May 2023 22:17:40 +0800 Subject: [PATCH] Refine export inp, add vertice and scada --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 117ca4e..28ca652 100644 --- a/main.py +++ b/main.py @@ -86,7 +86,11 @@ async def fastapi_import_inp(network: str, req: Request): @app.get("/exportinp/") async def fastapi_export_inp(network: str) -> ChangeSet: - return export_inp(network) + cs = export_inp(network) + op = cs.operations[0] + op['vertices'] = str(get_all_vertices(network)) + op['scada'] = str(get_all_scada_elements(network)) + return cs @app.post("/readinp/") async def fastapi_read_inp(network: str, inp: str) -> bool: