Skip to content

Commit e372de7

Browse files
Do not update record unnecessarily
1 parent 89a87b1 commit e372de7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/updateToV5ChallengeId.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ function * updateRecord (submission, failedContainer) {
3838
if (!v5challengeId) {
3939
logger.warn(`the challengeId: ${submission.challengeId} is not having a v5 challengeId`)
4040
failedContainer.push(submission)
41-
return
4241
} else if (v5challengeId === submission.challengeId) {
4342
logger.info(`the challengeId: ${submission.challengeId} is already a v5 challengeId`)
43+
} else {
44+
yield dbhelper.updateRecord(record)
4445
}
45-
46-
yield dbhelper.updateRecord(record)
4746
}
4847

4948
/*

0 commit comments

Comments
 (0)