From 8191e416fc46016a59624d76ff1fa49ec0dd580a Mon Sep 17 00:00:00 2001 From: Rakib Ansary Date: Wed, 13 Apr 2022 22:52:13 +0600 Subject: [PATCH] fix: challenge submission * remove addition of duplicate legacyChallengeId in UpdateExpression path --- src/services/SubmissionService.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/services/SubmissionService.js b/src/services/SubmissionService.js index 1e3e0847..48a65631 100755 --- a/src/services/SubmissionService.js +++ b/src/services/SubmissionService.js @@ -432,16 +432,12 @@ function * _updateSubmission (authUser, submissionId, entity) { Key: { id: submissionId }, - UpdateExpression: `set #type = :t, #url = :u, memberId = :m, challengeId = :c, - ${legacyChallengeId ? 'legacyChallengeId = :lc,' : ''} updated = :ua, updatedBy = :ub, submittedDate = :sb`, + UpdateExpression: `set #type = :t, #url = :u, memberId = :m, challengeId = :c, updated = :ua, updatedBy = :ub, submittedDate = :sb`, ExpressionAttributeValues: { ':t': entity.type || exist.type, ':u': entity.url || exist.url, ':m': entity.memberId || exist.memberId, ':c': challengeId, - ...(legacyChallengeId ? { - ':lc': legacyChallengeId - } : {}), ':ua': currDate, ':ub': authUser.handle || authUser.sub, ':sb': entity.submittedDate || exist.submittedDate || exist.created