From dce3a5b2c98636b5451e3e4097dce97881002382 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 10 Feb 2020 17:41:26 +0800 Subject: [PATCH] fix ActionView::Template::Error [undefined method `name` for nil:NilClass] --- app/views/admin/activities/download_excel_format.xlsx.axlsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/admin/activities/download_excel_format.xlsx.axlsx b/app/views/admin/activities/download_excel_format.xlsx.axlsx index 2917d85..509cb75 100644 --- a/app/views/admin/activities/download_excel_format.xlsx.axlsx +++ b/app/views/admin/activities/download_excel_format.xlsx.axlsx @@ -57,6 +57,7 @@ wb.add_worksheet(name: "Activities") do |sheet| sheet.add_row row2, :style => example User.where(:user_name.ne => "rulingcom").each do |user| + next if user.member_profile.nil? r = [user.user_name] r << user.name sheet.add_row r