From f1d7031b0ac5df65c8e8868cb2bb989460e1f345 Mon Sep 17 00:00:00 2001 From: jspark2000 Date: Sat, 7 Sep 2024 13:59:30 +0000 Subject: [PATCH] fix(be): do not update score when test submission --- .../apps/client/src/submission/submission-sub.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/backend/apps/client/src/submission/submission-sub.service.ts b/apps/backend/apps/client/src/submission/submission-sub.service.ts index b0cd8dabeb..6fb62bd4d7 100644 --- a/apps/backend/apps/client/src/submission/submission-sub.service.ts +++ b/apps/backend/apps/client/src/submission/submission-sub.service.ts @@ -191,7 +191,8 @@ export class SubmissionSubscriptionService implements OnModuleInit { select: { result: true } - } + }, + isTest: true } }) @@ -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)