Skip to content

Commit 8a48727

Browse files
committed
Make lint happy
1 parent ac3b482 commit 8a48727

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/events/projects/postTaasJobs.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ async function createTaasJobsFromProject(req, project, logger) {
5959
workload: _.get(job, 'workLoad.title', '').toLowerCase(),
6060
}).then((createdJob) => {
6161
logger.debug(`jobId: ${createdJob.id} job created with title "${createdJob.title}"`);
62-
job.jobId=createdJob.id
62+
/* eslint no-param-reassign: "error" */
63+
job.jobId = createdJob.id;
6364
}).catch((err) => {
6465
logger.error(`Unable to create job with title "${job.title}": ${err.message}`);
6566
}),
6667
),
6768
);
68-
const _prj = await models.Project.findByPk(project.id);
69-
if (!_prj) {
69+
const projectWithJobs = await models.Project.findByPk(project.id);
70+
if (!projectWithJobs) {
7071
logger.error(`Project not found for id ${project.id}, so couldn't save TaaS Job IDs`);
7172
}
72-
_prj.details.taasDefinition.taasJobs = jobs
73-
_prj.changed("details", true)
74-
await _prj.save();
75-
logger.info("Updated project saved:", JSON.stringify(_prj.details.taasDefinition.taasJobs, null, 4))
73+
projectWithJobs.details.taasDefinition.taasJobs = jobs;
74+
projectWithJobs.changed('details', true);
75+
await projectWithJobs.save();
7676
}
7777

7878
module.exports = createTaasJobsFromProject;

0 commit comments

Comments
 (0)