File tree 4 files changed +24
-4
lines changed
components/ChallengeEditor
4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ install_dependency: &install_dependency
22
22
sudo apt update
23
23
sudo apt install python3-pip
24
24
sudo pip3 install awscli --upgrade
25
+ sudo pip3 install docker==6.1.3
25
26
sudo pip3 install docker-compose
26
27
27
28
install_test_dependency : &install_test_dependency
@@ -152,7 +153,7 @@ workflows:
152
153
context : org-global
153
154
filters : &filters-dev
154
155
branches :
155
- only : ['develop', 'multiround', 'release_0.20.9']
156
+ only : ['develop', 'multiround', 'release_0.20.9', 'metadata-fix' ]
156
157
157
158
# Production builds are exectuted only on tagged commits to the
158
159
# master branch.
Original file line number Diff line number Diff line change @@ -102,7 +102,9 @@ const ChallengeView = ({
102
102
const showCheckpointPrizes = _ . get ( challenge , 'timelineTemplateId' ) === MULTI_ROUND_CHALLENGE_TEMPLATE_ID
103
103
const isDataScience = challenge . trackId === DS_TRACK_ID
104
104
const useDashboardData = _ . find ( challenge . metadata , { name : 'show_data_dashboard' } )
105
- const useDashboard = useDashboardData ? useDashboardData . value : true
105
+ const useDashboard = useDashboardData
106
+ ? ( _ . isString ( useDashboardData . value ) && useDashboardData . value === 'true' ) ||
107
+ ( _ . isBoolean ( useDashboardData . value ) && useDashboardData . value ) : false
106
108
107
109
return (
108
110
< div className = { styles . wrapper } >
Original file line number Diff line number Diff line change @@ -1069,8 +1069,11 @@ class ChallengeEditor extends Component {
1069
1069
}
1070
1070
let useDashboard = _ . find ( challengeMetadata , { name : 'show_data_dashboard' } )
1071
1071
if ( useDashboard === undefined ) {
1072
- useDashboard = { name : 'show_data_dashboard' , value : true }
1072
+ useDashboard = { name : 'show_data_dashboard' , value : 'false' }
1073
+ } else if ( _ . isBoolean ( useDashboard . value ) ) {
1074
+ useDashboard = { name : 'show_data_dashboard' , value : _ . toString ( useDashboard . value ) }
1073
1075
}
1076
+
1074
1077
newChallenge . metadata . push ( useDashboard )
1075
1078
}
1076
1079
try {
@@ -1646,7 +1649,11 @@ class ChallengeEditor extends Component {
1646
1649
const showCheckpointPrizes = challenge . timelineTemplateId === MULTI_ROUND_CHALLENGE_TEMPLATE_ID
1647
1650
const showDashBoard = ( challenge . trackId === DS_TRACK_ID && isChallengeType ) || ( isDevChallenge && isMM )
1648
1651
const useDashboardData = _ . find ( challenge . metadata , { name : 'show_data_dashboard' } )
1649
- const useDashboard = useDashboardData ? useDashboardData . value : true
1652
+
1653
+ const useDashboard = useDashboardData
1654
+ ? ( _ . isString ( useDashboardData . value ) && useDashboardData . value === 'true' ) ||
1655
+ ( _ . isBoolean ( useDashboardData . value ) && useDashboardData . value ) : false
1656
+
1650
1657
const workTypes = getDomainTypes ( challenge . trackId )
1651
1658
const filteredTypes = metadata . challengeTypes . filter ( type => workTypes . includes ( type . abbreviation ) )
1652
1659
Original file line number Diff line number Diff line change @@ -198,5 +198,15 @@ export const updateChallengePhaseBeforeSendRequest = (challengeDetail) => {
198
198
} ) )
199
199
return challengeDetailTmp
200
200
}
201
+ if ( challengeDetail . metadata && challengeDetail . metadata . length > 0 ) {
202
+ challengeDetail . metadata = challengeDetail . metadata . map ( m => {
203
+ // check if value is boolean and convert to string
204
+ if ( typeof m . value === 'boolean' ) {
205
+ m . value = m . value . toString ( )
206
+ }
207
+
208
+ return m
209
+ } )
210
+ }
201
211
return challengeDetail
202
212
}
You can’t perform that action at this time.
0 commit comments