From 2341d7f6757a22cc07b03368cdf9e908f6746c74 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Fri, 21 Oct 2022 23:27:17 +0800 Subject: [PATCH] Add update demand into batch command --- api/command.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/command.py b/api/command.py index 4c7bc0c..c471cd2 100644 --- a/api/command.py +++ b/api/command.py @@ -5,6 +5,7 @@ from .s4_tanks import * from .s5_pipes import * from .s6_pumps import * from .s7_valves import * +from .s9_demands import * def execute_add_command(name: str, cs: ChangeSet) -> ChangeSet: @@ -43,6 +44,8 @@ def execute_update_command(name: str, cs: ChangeSet) -> ChangeSet: return set_pump(name, cs) elif type == VALVE: return set_valve(name, cs) + elif type == 'demand': + return set_demand(name, cs) return ChangeSet()