课程学生列表、教师列表接口报错问题

This commit is contained in:
z9han 2014-12-23 15:24:18 +08:00
parent d7557e2839
commit 5ee37f32e2
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class CoursesService
else
c = Course.find(course)
end
if !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c)))
if current_user.nil? || !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c)))
raise '403'
end
@teachers= searchTeacherAndAssistant(c)