Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ workflows:
only:
- develop
- hotfix/deploy
- pm-2456

# Production builds are exectuted only on tagged commits to the testing
# master branch.
Expand Down
10 changes: 9 additions & 1 deletion src/services/ResourceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,20 @@ async function createResource (currentUser, resource) {
memberHandle: handle
}, resource)
const createdResource = await prisma.resource.create({
data: prismaData
data: prismaData,
include: {
resourceRole: {
select: {
name: true
}
}
}
})
let ret = _.pick(createdResource, payloadFields)
ret.created = createdResource.createdAt
ret.updated = createdResource.updatedAt
ret.phaseChangeNotifications = Boolean(createdResource.phaseChangeNotifications)
ret.roleName = _.get(createdResource, 'resourceRole.name', null)

logger.debug(`Created resource: ${JSON.stringify(ret)}`)
await helper.postEvent(config.RESOURCE_CREATE_TOPIC, ret)
Expand Down