diff --git a/nireports/assembler/report.py b/nireports/assembler/report.py index 3a6f0549..9e7b5ccf 100644 --- a/nireports/assembler/report.py +++ b/nireports/assembler/report.py @@ -255,13 +255,13 @@ def __init__( if bids_filters.get("subject"): subject_id = bids_filters["subject"] bids_filters["subject"] = ( - subject_id[4:] if subject_id.startswith("sub-") else subject_id + subject_id.removeprefix("sub-") ) if bids_filters.get("session"): session_id = bids_filters["session"] bids_filters["session"] = ( - session_id[4:] if session_id.startswith("ses-") else session_id + session_id.removeprefix("ses-") ) if bids_filters and out_filename == "report.html":