From ac44eafc7522bf8f72717ef9ed391564ef5d7ab0 Mon Sep 17 00:00:00 2001 From: Kostiantyn Kostiuk Date: Tue, 24 Oct 2023 18:43:27 +0300 Subject: [PATCH] Remove duplicates from judges list in spreadsheet results Signed-off-by: Kostiantyn Kostiuk --- app/services/spreadsheet/public.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/spreadsheet/public.rb b/app/services/spreadsheet/public.rb index 7d4c9419..d9bf2444 100644 --- a/app/services/spreadsheet/public.rb +++ b/app/services/spreadsheet/public.rb @@ -21,7 +21,7 @@ def build judges_style = workbook.styles.add_style JUDGES_STYLE_OPTIONS.deep_dup data_style = workbook.styles.add_style DATA_STYLE_OPTIONS.deep_dup - first_judge, *judges = @tasks.sum([], &:judges) + first_judge, *judges = @tasks.sum([], &:judges).uniq @grades.each do |grade| Rails.logger.debug { "Processing #{grade} grade of contest ##{@contest.id}..." }