fix ActionView::Template::Error [undefined method `name` for nil:NilClass]

This commit is contained in:
EricTYL 2020-02-10 17:41:26 +08:00
parent 3e0fad3c22
commit dce3a5b2c9
1 changed files with 1 additions and 0 deletions

View File

@ -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