fix: sustituido insert por insert ignore
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-11-04 12:37:07 +01:00
parent ab739f412f
commit 626355d251
1 changed files with 3 additions and 5 deletions

View File

@ -350,11 +350,9 @@ module.exports = Self => {
body: `${salix.url}worker/${previousWorkerFk}/time-control?timestamp=${timestamp}`
}, myOptions);
// await models.WorkerTimeControlMail.create({
// workerFk: previousWorkerFk,
// week: args.week,
// year: args.year
// }, myOptions);
query = `INSERT IGNORE INTO workerTimeControlMail (workerFk, year, week)
VALUES (?, ?, ?);`;
await Self.rawSql(query, [previousWorkerFk, args.year, args.week], myOptions);
previousWorkerFk = day.workerFk;
previousReceiver = day.receiver;