diff --git a/.circleci/config.yml b/.circleci/config.yml
index f363bf21..b2a60bfd 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -22,6 +22,7 @@ install_dependency: &install_dependency
sudo apt update
sudo apt install python3-pip
sudo pip3 install awscli --upgrade
+ sudo pip3 install docker==6.1.3
sudo pip3 install docker-compose
install_test_dependency: &install_test_dependency
@@ -152,7 +153,7 @@ workflows:
context : org-global
filters: &filters-dev
branches:
- only: ['develop', 'multiround', 'release_0.20.9']
+ only: ['develop', 'multiround', 'release_0.20.9', 'metadata-fix']
# Production builds are exectuted only on tagged commits to the
# master branch.
diff --git a/src/components/ChallengeEditor/ChallengeView/index.js b/src/components/ChallengeEditor/ChallengeView/index.js
index 667966ae..c2da57eb 100644
--- a/src/components/ChallengeEditor/ChallengeView/index.js
+++ b/src/components/ChallengeEditor/ChallengeView/index.js
@@ -102,7 +102,9 @@ const ChallengeView = ({
const showCheckpointPrizes = _.get(challenge, 'timelineTemplateId') === MULTI_ROUND_CHALLENGE_TEMPLATE_ID
const isDataScience = challenge.trackId === DS_TRACK_ID
const useDashboardData = _.find(challenge.metadata, { name: 'show_data_dashboard' })
- const useDashboard = useDashboardData ? useDashboardData.value : true
+ const useDashboard = useDashboardData
+ ? (_.isString(useDashboardData.value) && useDashboardData.value === 'true') ||
+ (_.isBoolean(useDashboardData.value) && useDashboardData.value) : false
return (
diff --git a/src/components/ChallengeEditor/index.js b/src/components/ChallengeEditor/index.js
index 6d4f6a74..a1605fce 100644
--- a/src/components/ChallengeEditor/index.js
+++ b/src/components/ChallengeEditor/index.js
@@ -1069,8 +1069,11 @@ class ChallengeEditor extends Component {
}
let useDashboard = _.find(challengeMetadata, { name: 'show_data_dashboard' })
if (useDashboard === undefined) {
- useDashboard = { name: 'show_data_dashboard', value: true }
+ useDashboard = { name: 'show_data_dashboard', value: 'false' }
+ } else if (_.isBoolean(useDashboard.value)) {
+ useDashboard = { name: 'show_data_dashboard', value: _.toString(useDashboard.value) }
}
+
newChallenge.metadata.push(useDashboard)
}
try {
@@ -1646,7 +1649,11 @@ class ChallengeEditor extends Component {
const showCheckpointPrizes = challenge.timelineTemplateId === MULTI_ROUND_CHALLENGE_TEMPLATE_ID
const showDashBoard = (challenge.trackId === DS_TRACK_ID && isChallengeType) || (isDevChallenge && isMM)
const useDashboardData = _.find(challenge.metadata, { name: 'show_data_dashboard' })
- const useDashboard = useDashboardData ? useDashboardData.value : true
+
+ const useDashboard = useDashboardData
+ ? (_.isString(useDashboardData.value) && useDashboardData.value === 'true') ||
+ (_.isBoolean(useDashboardData.value) && useDashboardData.value) : false
+
const workTypes = getDomainTypes(challenge.trackId)
const filteredTypes = metadata.challengeTypes.filter(type => workTypes.includes(type.abbreviation))
diff --git a/src/util/date.js b/src/util/date.js
index 4e39e31d..8be4a56e 100644
--- a/src/util/date.js
+++ b/src/util/date.js
@@ -198,5 +198,15 @@ export const updateChallengePhaseBeforeSendRequest = (challengeDetail) => {
}))
return challengeDetailTmp
}
+ if (challengeDetail.metadata && challengeDetail.metadata.length > 0) {
+ challengeDetail.metadata = challengeDetail.metadata.map(m => {
+ // check if value is boolean and convert to string
+ if (typeof m.value === 'boolean') {
+ m.value = m.value.toString()
+ }
+
+ return m
+ })
+ }
return challengeDetail
}