Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7090f8c

Browse files
Merge pull request #47 from topcoder-platform/develop
Fix issue where MM scorer reviews were not having tests passed info i…
2 parents 1b08d6d + 61ddee9 commit 7090f8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/LeaderboardService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ async function getLeaderboard (challengeId, memberId) {
3232
function getTestsPassed (metadata) {
3333
const tests = metadata.tests || { total: 0, pending: 0, failed: 0 }
3434

35-
let testsPassed = tests.total - tests.pending - tests.failed
35+
// MM scorer has passed tests count in the review already. Use it directly if it exists
36+
let testsPassed = tests.passed ? tests.passed : (tests.total - tests.pending - tests.failed)
3637

3738
if (!testsPassed) {
3839
testsPassed = 0

0 commit comments

Comments
 (0)