also pre-load notification policy overrides
test plan - specs should pass flag=notification_granular_course_preferences refs=KNO-402 Change-Id: I338b979b709ccabda2c9384a5038bd2017752c8c Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234103 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
f558a7c3b3
commit
f429d0a05c
|
@ -78,8 +78,8 @@ class DelayedNotification < ActiveRecord::Base
|
|||
|
||||
lookups.each do |klass, ids|
|
||||
includes = []
|
||||
includes = [ :notification_policies, { user: :pseudonyms } ] if klass == CommunicationChannel
|
||||
includes = [ :pseudonyms, { communication_channels: :notification_policies } ] if klass == User
|
||||
includes = [ :notification_policies, { user: [:pseudonyms, :notification_policy_overrides] } ] if klass == CommunicationChannel
|
||||
includes = [ :pseudonyms, { communication_channels: [:notification_policies, :notification_policy_overrides] } ] if klass == User
|
||||
|
||||
ids.each_slice(100) do |slice|
|
||||
yield klass.where(:id => slice).preload(includes).to_a
|
||||
|
|
Loading…
Reference in New Issue