Skip to content

Commit

Permalink
FIX: Drop session from prefix if no session level
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Oct 14, 2024
1 parent a4ccc21 commit ccc598c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nibabies/utils/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ def parse_bids_for_age_months(

# Play nice with sessions
subject = f'sub-{subject_id}'
session = f'ses-{session_id}' or ''
prefix = f'{subject}' + f'_{session}' if session else ''
session = f'ses-{session_id}' if session_id else ''
prefix = f'{subject}' + (f'_{session}' if session else '')

subject_level = session_level = Path(bids_root) / subject
if session_id:
Expand Down

0 comments on commit ccc598c

Please sign in to comment.