fix conversation bug for observers w/ no observed users
Change-Id: I1287dfc681c8d727898c5f356d233d1f62a3cae9 Reviewed-on: https://gerrit.instructure.com/5370 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Jacob Fugal <jacob@instructure.com>
This commit is contained in:
parent
fbdd2067be
commit
86544f39b9
|
@ -1634,7 +1634,8 @@ class User < ActiveRecord::Base
|
|||
conditions = {:course_section_id => section_id_hash[course.id]}
|
||||
when :restricted
|
||||
section_visibilities.each do |s|
|
||||
(restricted_course_hash[course.id] ||= []) << s[:associated_user_id] if s[:associated_user_id]
|
||||
restricted_course_hash[course.id] ||= []
|
||||
restricted_course_hash[course.id] << s[:associated_user_id] if s[:associated_user_id]
|
||||
end
|
||||
conditions = "enrollments.type = 'TeacherEnrollment' OR enrollments.type = 'TaEnrollment' OR enrollments.user_id IN (#{([self.id] + restricted_course_hash[course.id].uniq).join(',')})"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue