From 879d849f872d1883cd573dcc3d7eff712b1d5688 Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Mon, 24 Feb 2020 14:29:39 +0800 Subject: [PATCH] fix export excel bug caused by related to more than one members. --- app/views/admin/projects/download_excel.xlsx.axlsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/projects/download_excel.xlsx.axlsx b/app/views/admin/projects/download_excel.xlsx.axlsx index 434100b..6dcb9f2 100644 --- a/app/views/admin/projects/download_excel.xlsx.axlsx +++ b/app/views/admin/projects/download_excel.xlsx.axlsx @@ -46,7 +46,7 @@ wb = xlsx_package.workbook data.each do |proj| - row = [proj.member_profile.name] + row = [(proj.member_profile_id.class == Array ? proj.member_profile_id.map{|member_id| MemberProfile.find(member_id).name rescue ""} : [proj.member_profile.name])] @site_in_use_locales.each do |locale| row << proj.project_title_translations[locale.to_s] end