修改课程列表显示有误的问题
This commit is contained in:
parent
c2166811eb
commit
f1f61c304a
|
@ -47,6 +47,7 @@ class SyllabusesService
|
|||
syllabus_ids = courses.empty? ? '(-1)' : "(" + courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
||||
syllabuses = Syllabus.where("id in #{syllabus_ids} or user_id = #{user.id}").order("updated_at desc")
|
||||
|
||||
user.syllabuses = syllabuses
|
||||
user.syllabuses.each do |syllabus|
|
||||
syllabus.courses = syllabus.courses.not_deleted
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue