@@ -914,9 +914,7 @@ async function createChallenge (currentUser, challenge) {
914
914
const { billingAccountId, markup } = await helper . getProjectBillingInformation ( _ . get ( challenge , 'projectId' ) )
915
915
if ( billingAccountId && _ . isUndefined ( _ . get ( challenge , 'billing.billingAccountId' ) ) ) {
916
916
_ . set ( challenge , 'billing.billingAccountId' , billingAccountId )
917
- }
918
- if ( markup && _ . isUndefined ( _ . get ( challenge , 'billing.markup' ) ) ) {
919
- _ . set ( challenge , 'billing.markup' , markup )
917
+ _ . set ( challenge , 'billing.markup' , markup || 0 )
920
918
}
921
919
if ( _ . get ( type , 'isTask' ) ) {
922
920
_ . set ( challenge , 'task.isTask' , true )
@@ -1108,7 +1106,7 @@ createChallenge.schema = {
1108
1106
value : Joi . number ( ) . min ( 0 ) . required ( )
1109
1107
} ) ) . min ( 1 ) . required ( )
1110
1108
} ) ) ,
1111
- tags : Joi . array ( ) . items ( Joi . string ( ) . required ( ) ) , // tag names
1109
+ tags : Joi . array ( ) . items ( Joi . string ( ) ) , // tag names
1112
1110
projectId : Joi . number ( ) . integer ( ) . positive ( ) . required ( ) ,
1113
1111
legacyId : Joi . number ( ) . integer ( ) . positive ( ) ,
1114
1112
startDate : Joi . date ( ) ,
@@ -1294,9 +1292,7 @@ async function update (currentUser, challengeId, data, isFull) {
1294
1292
const { billingAccountId, markup } = await helper . getProjectBillingInformation ( _ . get ( challenge , 'projectId' ) )
1295
1293
if ( billingAccountId && _ . isUndefined ( _ . get ( challenge , 'billing.billingAccountId' ) ) ) {
1296
1294
_ . set ( data , 'billing.billingAccountId' , billingAccountId )
1297
- }
1298
- if ( markup && _ . isUndefined ( _ . get ( challenge , 'billing.markup' ) ) ) {
1299
- _ . set ( data , 'billing.markup' , markup )
1295
+ _ . set ( data , 'billing.markup' , markup || 0 )
1300
1296
}
1301
1297
if ( data . status ) {
1302
1298
if ( data . status === constants . challengeStatuses . Active ) {
@@ -1895,7 +1891,7 @@ fullyUpdateChallenge.schema = {
1895
1891
url : Joi . string ( ) ,
1896
1892
options : Joi . array ( ) . items ( Joi . object ( ) )
1897
1893
} ) ) ,
1898
- tags : Joi . array ( ) . items ( Joi . string ( ) . required ( ) ) , // tag names
1894
+ tags : Joi . array ( ) . items ( Joi . string ( ) ) , // tag names
1899
1895
projectId : Joi . number ( ) . integer ( ) . positive ( ) . required ( ) ,
1900
1896
legacyId : Joi . number ( ) . integer ( ) . positive ( ) ,
1901
1897
startDate : Joi . date ( ) ,
0 commit comments