File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/projects/create/components Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -107,16 +107,18 @@ class ProjectWizard extends Component {
107107 const updateQuery = { }
108108 if ( params && params . product ) { // if there exists product path param
109109 // first try the path param to be a project category
110- let projectType = findCategory ( params . product )
110+ let projectType = findCategory ( params . product , true )
111111 if ( projectType ) { // if its a category
112112 updateQuery [ 'type' ] = { $set : projectType . id }
113113 wizardStep = WZ_STEP_SELECT_PROD_TYPE
114114 } else {
115115 // if it is not a category, it should be a product and we should be able to find a category for it
116- projectType = findProductCategory ( params . product )
116+ projectType = findProductCategory ( params . product , true )
117+ // finds product object from product alias
118+ const product = findProduct ( params . product , true )
117119 if ( projectType ) { // we can have `incomplete` as params.product
118120 updateQuery [ 'type' ] = { $set : projectType . id }
119- updateQuery [ 'details' ] = { products : { $set : [ params . product ] } }
121+ updateQuery [ 'details' ] = { products : { $set : [ product . id ] } }
120122 wizardStep = WZ_STEP_FILL_PROJ_DETAILS
121123 }
122124 }
You can’t perform that action at this time.
0 commit comments