Skip to content

Commit

Permalink
fix: Copy input lists we intend to mutate
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 5, 2024
1 parent d60c287 commit c91991c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nireports/interfaces/reporting/masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ def _generate_report(self):
seg_files = self.inputs.in_rois
mask_file = None if not isdefined(self.inputs.in_mask) else self.inputs.in_mask

levels = self.inputs.levels or []
colors = self.inputs.colors or []
# Remove trait decoration and replace None with []
levels = list(self.inputs.levels or [])
colors = list(self.inputs.colors or [])

if len(seg_files) == 1: # in_rois is a segmentation
nsegs = len(levels)
Expand Down

0 comments on commit c91991c

Please sign in to comment.