From a8e69d1a828295eb5f2ce7ff92aba7a0e6a13897 Mon Sep 17 00:00:00 2001 From: Arjun Araneta Date: Fri, 20 Sep 2024 02:47:12 +0800 Subject: [PATCH] fix for challenge table (#465) --- app/models/challenge.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 6a9273e7..0b17fb89 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -106,7 +106,8 @@ def self.to_csv(competition, options = {}) def self.challenge_csv_line(challenge, competition, challenge_columns) values = [challenge.region.name, competition.year] values += challenge.attributes.values_at(*challenge_columns) - values << challenge.sponsors.pluck(:name) + #values << challenge.sponsors.pluck(:name) + values << challenge.sponsors&.pluck(:name)&.compact&.join(',') values << challenge.published_entries.length end