File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,10 @@ module.exports = [
238238 createdBy : req . authUser . userId ,
239239 } ] ,
240240 } ) ;
241+ // backward compatibility for releasing the service before releasing the front end
242+ if ( ! project . templateId ) {
243+ project . version = 'v2' ;
244+ }
241245 models . sequelize . transaction ( ( ) => {
242246 let newProject = null ;
243247 let newPhases ;
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ describe('Project create', () => {
367367 resJson . directProjectId . should . be . eql ( 128 ) ;
368368 resJson . status . should . be . eql ( 'draft' ) ;
369369 resJson . type . should . be . eql ( body . param . type ) ;
370- resJson . version . should . be . eql ( 'v3 ' ) ;
370+ resJson . version . should . be . eql ( 'v2 ' ) ;
371371 resJson . members . should . have . lengthOf ( 1 ) ;
372372 resJson . members [ 0 ] . role . should . be . eql ( 'customer' ) ;
373373 resJson . members [ 0 ] . userId . should . be . eql ( 40051331 ) ;
You can’t perform that action at this time.
0 commit comments