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

PROD-2308 Challenge Name Sync Issue -> develop #77

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/services/challengeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function createChallenge (challenge) {
*/
async function updateChallenge (challenge) {
try {
const updateChallenge = new Challenge(_.omit(challenge, ['created', 'createdBy']))
const updateChallenge = new Challenge(_.omit(challenge, ['created', 'createdBy', 'name']))
// numOfSubmissions and numOfRegistrants are not stored in dynamo, they're calclated by the ES processor
await Challenge.update({ id: challenge.id }, _.omit(updateChallenge, challengePropertiesToOmitFromDynamo))
await getESClient().update({
Expand All @@ -88,7 +88,7 @@ async function updateChallenge (challenge) {
id: challenge.id,
body: {
doc: {
..._.omit(challenge, ['created', 'createdBy']),
..._.omit(challenge, ['created', 'createdBy', 'name']),
groups: _.filter(challenge.groups, g => _.toString(g).toLowerCase() !== 'null')
}
}
Expand Down Expand Up @@ -551,8 +551,8 @@ async function buildV5Challenge (legacyId, challengeListing, challengeDetails) {
detailRequirement = challengeDetails.introduction + '<br />' + detailRequirement
}
if (_.get(challengeDetails, 'finalSubmissionGuidelines', '').trim() !== 'null' &&
_.get(challengeDetails, 'finalSubmissionGuidelines', '').trim() !== '' &&
_.get(challengeDetails, 'finalSubmissionGuidelines', '').trim() !== 'Please read above') {
_.get(challengeDetails, 'finalSubmissionGuidelines', '').trim() !== '' &&
_.get(challengeDetails, 'finalSubmissionGuidelines', '').trim() !== 'Please read above') {
detailRequirement += '<br /><br /><h2>Final Submission Guidelines</h2>' + challengeDetails.finalSubmissionGuidelines
}
} else {
Expand Down