diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 63155e25a..9039fd041 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -573,7 +573,7 @@ class UsersController < ApplicationController @r_sort = @b_sort == "desc" ? "asc" : "desc" @user = User.current search = params[:name].to_s.strip.downcase - type_ids = params[:property]=="" ? "(1, 2, 3)" : "(" + params[:property] + ")" + type_ids = params[:property]=="" || params[:property].nil? ? "(1, 2, 3)" : "(" + params[:property] + ")" if(params[:type].blank? || params[:type] == "1") #全部 visible_course = Course.where("is_public = 1 && is_delete = 0") visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")" diff --git a/app/views/users/_homework_repository_list.html.erb b/app/views/users/_homework_repository_list.html.erb index 99e6d4e27..678bf65d7 100644 --- a/app/views/users/_homework_repository_list.html.erb +++ b/app/views/users/_homework_repository_list.html.erb @@ -25,9 +25,9 @@ <% end%>