diff --git a/src/popper/parser.py b/src/popper/parser.py index 2e03c2ccb..0a4abfb92 100644 --- a/src/popper/parser.py +++ b/src/popper/parser.py @@ -142,10 +142,12 @@ def __apply_substitution(wf_element, k, v, used_registry): log.fail("Substitutions not allowed on dictionary keys") if type(wf_element[ek]) == str and k in wf_element[ek]: log.debug(f"Applying substitution to value associated to key {k}") + wf_element[ek] = wf_element[ek].replace(k, v) + used_registry[k] = 1 + else: wf_element[ek] = WorkflowParser.__apply_substitution( wf_element[ek], k, v, used_registry ) - used_registry[k] = 1 return wf_element