From b54312e729b70d20ef2d0da90530d7587aa12325 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 27 Feb 2020 18:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/homework_common.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index 58e5120de..a3030a728 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -149,7 +149,7 @@ class HomeworkCommon < ApplicationRecord # 作业能否立即截止 def end_immediately charge_ids - (unified_setting && homework_detail_manual.try(:comment_status) == 1 && end_time > Time.now) || + (unified_setting && homework_detail_manual.try(:comment_status) == 1 && end_time.present? && end_time > Time.now) || homework_group_settings.select{|setting| charge_ids.include?(setting.course_group_id) && !setting.publish_time.nil? && setting.publish_time < Time.now && setting.end_time > Time.now}.size > 0 end