Skip to content

Commit 0611e65

Browse files
committed
fix(interview-scheduler): await getJob promise
Fix an issue, which was causing getting `undefined` as jobProjectId. This was causing unexpected behaviors when checking the project-based user access level. Addresses topcoder-archive/topcoder-platform-taas-app#173 (comment)
1 parent 2a079f5 commit 0611e65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/InterviewService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const esClient = helper.getESClient()
2626
async function ensureUserIsPermitted (currentUser, jobCandidateId) {
2727
if (!currentUser.hasManagePermission && !currentUser.isMachine) {
2828
const jobCandidate = await models.JobCandidate.findById(jobCandidateId)
29-
const job = jobCandidate.getJob()
29+
const job = await jobCandidate.getJob()
3030
await helper.checkIsMemberOfProject(currentUser.userId, job.projectId)
3131
}
3232
}

0 commit comments

Comments
 (0)