diff --git a/modules/item/back/methods/item-image-queue/downloadImages.js b/modules/item/back/methods/item-image-queue/downloadImages.js index 420b357a5c..d953d19383 100644 --- a/modules/item/back/methods/item-image-queue/downloadImages.js +++ b/modules/item/back/methods/item-image-queue/downloadImages.js @@ -26,7 +26,9 @@ module.exports = Self => { await fs.mkdir(tempPath, {recursive: true}); const timer = setInterval(async() => { - const image = await Self.findOne({where: {error: null}}); + const image = await Self.findOne({ + where: {error: null, url: {neq: null}} + }); // Exit loop if (!image) return clearInterval(timer); diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index 3a34be4429..878b4278e0 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -245,7 +245,7 @@ module.exports = Self => { SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped FROM tmp.filter f LEFT JOIN alertLevel al ON al.alertLevel = f.alertLevel - WHERE (f.alertLevelCode = 'FREE' OR f.alertLevel IS NULL) + WHERE (al.code = 'FREE' OR f.alertLevel IS NULL) AND f.shipped >= CURDATE()`); stmts.push('CALL ticketGetProblems()');