Skip to content

Commit

Permalink
only modify fieldmap_id when not None
Browse files Browse the repository at this point in the history
  • Loading branch information
psadil committed Oct 2, 2024
1 parent bd290fc commit a288dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fmriprep/utils/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def collect_derivatives(
**q,
**{k: v for k, v in entities.items() if k not in ['suffix', 'extension']},
}
if xfm == 'boldref2fmap':
if xfm == 'boldref2fmap' and fieldmap_id:
# fieldmaps have ids like auto_00000
query['to'] = fieldmap_id.replace('_', '')
item = layout.get(return_type='filename', **query)
Expand Down

0 comments on commit a288dea

Please sign in to comment.