X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomtask%2Fprocesses.py;h=089a7105fddcd9228dbaebcfd3c6313e3ff57f6b;hb=c39bd250d747d2dd0bebee8c2f99f2c0fac6926c;hp=bfadc2bf9760166987fc6b52b13290f6811a02aa;hpb=80025e0b2d278a44852b6a397184d1f71c2075fe;p=plomtask diff --git a/plomtask/processes.py b/plomtask/processes.py index bfadc2b..089a710 100644 --- a/plomtask/processes.py +++ b/plomtask/processes.py @@ -93,6 +93,13 @@ class Process(BaseModel[int], ConditionsRelations): for child in explicit_children: assert isinstance(child.id_, int) node.steps[child.id_] = make_node(child) + # ensure that one (!) explicit step of process replaces + # one (!) implicit step of same process + for i in [i for i, s in node.steps.items() + if not s.is_explicit + and s.process.id_ == child.step_process_id]: + del node.steps[i] + break node.seen = node_id in seen_step_ids seen_step_ids.add(node_id) for id_, step in node.steps.items():