fix checkinbox
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-09-23 09:31:21 +02:00
parent 1f23f6c53c
commit 3f4e5a6c0c
1 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ module.exports = Self => {
const user = await getUser(from);
let workerMail;
if (user.id != NULL) {
if (user.id != null) {
workerMail = await Self.app.models.WorkerTimeControlMail.findOne({
where: {
week: week,
@ -110,7 +110,7 @@ module.exports = Self => {
}
});
}
if (workerMail != NULL) {
if (workerMail != null) {
await workerMail.updateAttributes({
updated: now,
state: 'CONFIRMED'
@ -129,7 +129,7 @@ module.exports = Self => {
const user = await getUser(from);
let workerMail;
if (user.id != NULL) {
if (user.id != null) {
workerMail = await Self.app.models.WorkerTimeControlMail.findOne({
where: {
week: week,
@ -138,7 +138,7 @@ module.exports = Self => {
}
});
if (workerMail != NULL) {
if (workerMail != null) {
await workerMail.updateAttributes({
updated: now,
state: 'REVISE',