|
|
@ -12,9 +12,8 @@ class CreateSubjectCourseStudentJob < ApplicationJob
|
|
|
|
course.subject.subject_appointments.each do |app|
|
|
|
|
course.subject.subject_appointments.each do |app|
|
|
|
|
next if course.students.where(user_id: app.user_id).any?
|
|
|
|
next if course.students.where(user_id: app.user_id).any?
|
|
|
|
worker.add same_attrs.merge(user_id: app.user_id)
|
|
|
|
worker.add same_attrs.merge(user_id: app.user_id)
|
|
|
|
|
|
|
|
app.destroy
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
course.subject.subject_appointments.destroy_all
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|