diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 4685c9f69..8e4b888a1 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -196,7 +196,7 @@ class HomeworkCommonsController < ApplicationController if params[:format] == "xlsx" if @user_course_identity >= Course::STUDENT tip_exception(403, "无权限操作") - elsif @work_excel.size == 0 + elsif @work_excel.blank? || @work_excel.size == 0 normal_status(-1,"暂无用户提交!") else respond_to do |format|