From 7367d1cdfeb5f5b4ba9114229ced38bd920e70c9 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 27 Jul 2023 14:41:53 +0200 Subject: [PATCH] refs #6013 fix: add await --- .../back/methods/worker-time-control/weeklyHourRecordEmail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/worker/back/methods/worker-time-control/weeklyHourRecordEmail.js b/modules/worker/back/methods/worker-time-control/weeklyHourRecordEmail.js index f44080559..3203dea82 100644 --- a/modules/worker/back/methods/worker-time-control/weeklyHourRecordEmail.js +++ b/modules/worker/back/methods/worker-time-control/weeklyHourRecordEmail.js @@ -51,7 +51,7 @@ module.exports = Self => { const salix = await models.Url.findOne({ where: { appName: 'salix', - environment: process.env.NODE_ENV || 'dev' + environment: process.env.NODE_ENV || 'development' } }, myOptions); @@ -61,7 +61,7 @@ module.exports = Self => { const url = `${salix.url}worker/${args.workerId}/time-control?timestamp=${timestamp}`; ctx.args.url = url; - Self.sendTemplate(ctx, 'weekly-hour-record'); + await Self.sendTemplate(ctx, 'weekly-hour-record'); return models.WorkerTimeControl.updateWorkerTimeControlMail(ctx, myOptions); };