From e1cda8ee615d68de7298c83aefea2348de9765d6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 11 Sep 2019 11:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E4=BB=BB=E5=8A=A1=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/graduation_tasks_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index fe7511e29..a159cff59 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -326,7 +326,7 @@ class GraduationTasksController < ApplicationController tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day - ActiveRecord::Base.transaction do + # ActiveRecord::Base.transaction do begin tasks = @course.graduation_tasks.where(id: params[:task_ids], status: 0). where("publish_time is null or publish_time > '#{Time.now}'") @@ -350,7 +350,7 @@ class GraduationTasksController < ApplicationController tip_exception(e.message) raise ActiveRecord::Rollback end - end + # end end def end_task