Skip to content

Commit 1765d4a

Browse files
committed
fix: Key pared_cache on bids_id
1 parent 24b04e3 commit 1765d4a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fmriprep/workflows/base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,8 @@ def init_single_subject_wf(subject_id: str):
571571
# Find precomputed fieldmaps that apply to this workflow
572572
pared_cache = {}
573573
for est in all_estimators:
574-
fmapid = re.sub(r'[^a-zA-Z0-9]', '', est.bids_id)
575-
if fmapid in fmap_cache:
576-
pared_cache[fmapid] = fmap_cache[fmapid]
574+
if found := fmap_cache.get(re.sub(r'[^a-zA-Z0-9]', '', est.bids_id)):
575+
pared_cache[est.bids_id] = found
577576
else:
578577
fmap_estimators.append(est)
579578

0 commit comments

Comments
 (0)