Update contents of variable directly

Also, it makes the line shorter, allowing us to use one-line if syntax :)
This commit is contained in:
David Cook
2023-07-07 14:22:36 +10:00
committed by GitHub
parent a80ff6097a
commit 17da66b72a

View File

@@ -45,9 +45,7 @@ module Reporting
OpenStruct.new(item: item, full_row: row, row: @builder.slice_and_format_row(row))
}
if @report.skip_duplicate_rows?
@computed_data = @computed_data.uniq { |data| data.row.to_h.values }
end
@computed_data.uniq! { |data| data.row.to_h.values } if @report.skip_duplicate_rows?
@computed_data
end