Skip to content

Commit b2f9d3c

Browse files
committed
fix: allow "duration" during job creation
1 parent 9ad5a9d commit b2f9d3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/services/JobService.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ async function createJob (currentUser, job) {
153153
job.createdAt = new Date()
154154
job.createdBy = await helper.getUserId(currentUser.userId)
155155
job.status = 'sourcing'
156+
// hotfix to support update Project Service until we release TaaS API 1.5
157+
delete job.duration
156158

157159
const created = await Job.create(job)
158160
await helper.postEvent(config.TAAS_JOB_CREATE_TOPIC, job)
@@ -167,6 +169,8 @@ createJob.schema = Joi.object().keys({
167169
description: Joi.string(),
168170
title: Joi.title().required(),
169171
startDate: Joi.date(),
172+
// hotfix to support update Project Service until we release TaaS API 1.5
173+
duration: Joi.number().integer().min(1).allow(null),
170174
endDate: Joi.date(),
171175
numPositions: Joi.number().integer().min(1).required(),
172176
resourceType: Joi.string(),

0 commit comments

Comments
 (0)