Skip to content

Commit

Permalink
Merge pull request #526 from rfcx/bug/fix-project-external-id
Browse files Browse the repository at this point in the history
Fix project external_id is null
  • Loading branch information
rassokhin-s authored Jan 8, 2024
2 parents d2fa320 + 83b7965 commit 35ab0ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/projects/bl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ async function create (params, options = {}) {

return sequelize.transaction(async (transaction) => {
options.transaction = transaction
const result = await dao.create(project, options)
await addRole(result.createdById, OWNER, result.id, PROJECT, options)

if (arbimonService.isEnabled && options.requestSource !== 'arbimon') {
try {
Expand All @@ -78,6 +76,9 @@ async function create (params, options = {}) {
console.error(`Error creating project in Arbimon (project: ${project.id})`)
}
}

const result = await dao.create(project, options)
await addRole(result.createdById, OWNER, result.id, PROJECT, options)
return result
})
}
Expand Down

0 comments on commit 35ab0ea

Please sign in to comment.