Skip to content

Commit

Permalink
fix: multiplicity of connections
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Dec 11, 2020
1 parent e8ac4fc commit afd4a00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdcflows/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def init_fmap_preproc_wf(
}
outputnode = pe.Node(niu.IdentityInterface(fields=out_fields), name="outputnode")

workflow.connect([
(mergenode, outputnode, [("out", field)])
for field, mergenode in out_merge.items()
])

for n, estimator in enumerate(estimators):
est_wf = estimator.get_workflow(omp_nthreads=omp_nthreads, debug=debug)
source_files = [str(f.path) for f in estimator.sources]
Expand Down Expand Up @@ -146,6 +151,5 @@ def init_fmap_preproc_wf(

for field, mergenode in out_merge.items():
workflow.connect(out_map, field, mergenode, f"in{n}")
workflow.connect(mergenode, "out", outputnode, field)

return workflow

0 comments on commit afd4a00

Please sign in to comment.