Use operation prefix

This commit is contained in:
WQY\qiong
2022-11-17 18:47:14 +08:00
parent b97d795484
commit 7a85867483
19 changed files with 19 additions and 19 deletions

View File

@@ -113,7 +113,7 @@ def inp_in_demand(section: list[str]) -> ChangeSet:
cs = ChangeSet()
for junction, demands in objs.items():
obj_cs = {'operation': API_UPDATE, 'type': 'demand', 'junction' : junction, 'demands' : []}
obj_cs : dict[str, Any] = g_update_prefix | {'type': 'demand', 'junction' : junction, 'demands' : []}
for obj in demands:
obj_cs['demands'].append({'demand': obj.demand, 'pattern' : obj.pattern, 'category': obj.category})
cs.append(obj_cs)