diff --git a/app/views/managements/_user_agent_list.html.erb b/app/views/managements/_user_agent_list.html.erb index 18ac8a09..e386970c 100644 --- a/app/views/managements/_user_agent_list.html.erb +++ b/app/views/managements/_user_agent_list.html.erb @@ -13,13 +13,13 @@ <% @user_agents.each do |ua| %> <% user = User.find_by_login(ua.key) %> - <% user_extension = user.user_extensions %> - <% school = user_extension.school %> + <% user_extension = user&.user_extensions %> + <% school = user_extension&.school %> <%= ua.id %> <%= link_to ua.key, user_path(ua.key), :target => "_blank" %> <%= link_to user.try(:show_real_name), user_path(user), target:'_blank' %> - <%= school.name %> + <%= school&.name %> <%= ua.action_status == 2 ? "代理之后注册" : "--" %> <%= ua.register_status == 2 ? "代理之后报名" : "--" %> <%= ua.ip %>