diff --git a/app/controllers/attendances_controller.rb b/app/controllers/attendances_controller.rb index 936bef188..000c90428 100644 --- a/app/controllers/attendances_controller.rb +++ b/app/controllers/attendances_controller.rb @@ -106,7 +106,7 @@ class AttendancesController < ApplicationController attrs = %i[course_attendance_id user_id course_member_id course_id course_group_id created_at updated_at] - same_attrs = {course_attendance_id: attendance.id, course_id: course.id} + same_attrs = {course_attendance_id: @attendance.id, course_id: @course.id} CourseMemberAttendance.bulk_insert(*attrs) do |worker|