From fa4e184a032b8fa4fcb3f68d8919451bc3c2ab63 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Wed, 3 Jul 2019 18:11:08 +0800 Subject: [PATCH] fix bug --- app/controllers/homework_commons_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 0ab3a6381..9780b4eec 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -109,7 +109,7 @@ class HomeworkCommonsController < ApplicationController logger.info("###########______@homework.publish_time_________#{@homework.publish_time}") - if @homework.publish_time.nil? || (@homework.publish_time > Time.now) + if @homework.publish_time.present? || (@homework.publish_time > Time.now) @student_works = [] if (params[:format] == "xlsx") || (params[:format] == "zip") normal_status(-1,"作业未发布")