Skip to content

Commit 9db5197

Browse files
committed
use a join for course counts on sub accounts
refs CNVS-20225 test plan - on sub accounts page the count should be accurate Change-Id: I6302450ad5ec8c57fbc816ced4d11247abbe4447 Reviewed-on: https://gerrit.instructure.com/53515 Tested-by: Jenkins Reviewed-by: Cody Cutrer <cody@instructure.com> QA-Review: August Thornton <august@instructure.com> Product-Review: Rob Orton <rob@instructure.com>
1 parent cdca91a commit 9db5197

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/models/account.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ def consume_account(account)
11501150
end
11511151

11521152
def course_count
1153-
self.child_courses.not_deleted.count('DISTINCT course_id')
1153+
self.courses.active.count
11541154
end
11551155

11561156
def sub_account_count

0 commit comments

Comments
 (0)