Skip to content

Commit b51a357

Browse files
author
Vikas Agarwal
committed
Returning id of the created project estimations
1 parent 1a65453 commit b51a357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/projects/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function createProjectAndPhases(req, project, projectTemplate, productTemplates)
9797
createdBy: req.authUser.userId,
9898
updatedBy: req.authUser.userId,
9999
}, estimation));
100-
return models.ProjectEstimation.bulkCreate(estimations).then((projectEstimations) => {
100+
return models.ProjectEstimation.bulkCreate(estimations, { returning: true }).then((projectEstimations) => {
101101
result.estimations = _.map(projectEstimations, estimation =>
102102
_.omit(estimation.toJSON(), ['deletedAt', 'deletedBy']));
103103
return Promise.resolve(newProject);

0 commit comments

Comments
 (0)