File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
src/components/ChallengeEditor Expand file tree Collapse file tree 2 files changed +13
-4
lines changed 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' ) : false
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 }
1073
- }
1072
+ useDashboard = { name : 'show_data_dashboard' , value : "false" }
1073
+ } else if ( _ . isBoolean ( useDashboard . value ) ) {
1074
+ useDashboard = { name : 'show_data_dashboard' , value : _ . toString ( useDashboard . value ) }
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
+
1654
+ const useDashboard = useDashboardData ?
1655
+ ( _ . isString ( useDashboardData . value ) && useDashboardData . value === "true" ) ||
1656
+ ( _ . isBoolean ( useDashboardData . value ) && useDashboardData . value ) : false
1650
1657
const workTypes = getDomainTypes ( challenge . trackId )
1651
1658
const filteredTypes = metadata . challengeTypes . filter ( type => workTypes . includes ( type . abbreviation ) )
1652
1659
You can’t perform that action at this time.
0 commit comments