From 8828a04432d1e934e06b3ed785a14793516134fd Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 5 Jul 2019 14:17:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/course_delete_student_delete_works_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/course_delete_student_delete_works_job.rb b/app/jobs/course_delete_student_delete_works_job.rb index 9bdb93b87..c12762fbe 100644 --- a/app/jobs/course_delete_student_delete_works_job.rb +++ b/app/jobs/course_delete_student_delete_works_job.rb @@ -4,7 +4,7 @@ class CourseDeleteStudentDeleteWorksJob < ApplicationJob def perform(course_id, student_ids) course = Course.find_by(id: course_id) return if course.blank? - course = self.course + student_works = StudentWork.joins(:homework_common).where(user_id: student_ids, homework_commons: {course_id: course.id}) student_works.update_all(is_delete: 1)