Skip to content

Commit

Permalink
fix(be): do not update score when test submission
Browse files Browse the repository at this point in the history
  • Loading branch information
jspark2000 committed Sep 7, 2024
1 parent dd73ac2 commit f1d7031
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ export class SubmissionSubscriptionService implements OnModuleInit {
select: {
result: true
}
}
},
isTest: true
}
})

Expand All @@ -213,6 +214,8 @@ export class SubmissionSubscriptionService implements OnModuleInit {
data: { result: submissionResult }
})

if (submission.isTest) return

if (submission.userId && submission.contestId)
await this.calculateSubmissionScore(submission, allAccepted)

Expand Down

0 comments on commit f1d7031

Please sign in to comment.