@ -260,7 +260,7 @@ class Course < ApplicationRecord
member = user.is_a?(CourseMember) ? user : course_member(user&.id)
group_ids = if member.present?
member.teacher_course_groups.size > 0 ? member.teacher_course_groups.pluck(:course_group_id) : course_groups.pluck(:id)
elsif user.admin_or_business?
elsif user&.admin_or_business?
course_groups.pluck(:id)
else
[]