eliminate an N+1 in missing_policy_applicator
test plan: - specs pass Change-Id: I1a116700ea957c4f57daec101e01c1419e623ff1 Reviewed-on: https://gerrit.instructure.com/209051 Reviewed-by: Adrian Packel <apackel@instructure.com> Tested-by: Jenkins QA-Review: Keith Garner <kgarner@instructure.com> Product-Review: Keith Garner <kgarner@instructure.com>
This commit is contained in:
parent
a7e29ac13a
commit
c22a1490dd
|
@ -35,7 +35,7 @@ class MissingPolicyApplicator
|
|||
now = Time.zone.now
|
||||
Submission.active.
|
||||
joins(assignment: {course: :late_policy}).
|
||||
eager_load(:grading_period, assignment: { course: :late_policy }).
|
||||
eager_load(:grading_period, assignment: [:post_policy, { course: [:late_policy, :default_post_policy] }]).
|
||||
for_enrollments(Enrollment.all_active_or_pending).
|
||||
missing.
|
||||
where(score: nil, grade: nil, cached_due_date: 1.day.ago(now)..now,
|
||||
|
|
Loading…
Reference in New Issue