From 29842e66ac3016ec63ef16b29c0ac87f62d5707e Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Mon, 24 Feb 2020 14:20:54 +0800 Subject: [PATCH] fix export excel bug caused by related to more than one members --- app/views/admin/journal_papers/download_excel.xlsx.axlsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/journal_papers/download_excel.xlsx.axlsx b/app/views/admin/journal_papers/download_excel.xlsx.axlsx index 9fc5faa..2bf3f08 100644 --- a/app/views/admin/journal_papers/download_excel.xlsx.axlsx +++ b/app/views/admin/journal_papers/download_excel.xlsx.axlsx @@ -60,7 +60,7 @@ wb = xlsx_package.workbook sheet.add_row row, :style => heading data.each do |jp| - row = [jp.member_profile.name] + row = [(jp.member_profile_id.class == Array ? jp.member_profile_id.map{|member_id| MemberProfile.find(member_id).name rescue ""} : [jp.member_profile.name])] @site_in_use_locales.each do |locale| row << jp.paper_title_translations[locale.to_s] end