From 2bb6c1c1da55b90f5c16244e290101b6d6703378 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 1 Dec 2022 07:54:32 +0100 Subject: [PATCH 1/2] fix: borra registros aunq no tengan file adjunto --- back/methods/dms/deleteTrashFiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/dms/deleteTrashFiles.js b/back/methods/dms/deleteTrashFiles.js index 63d7021c5..f14e65e9f 100644 --- a/back/methods/dms/deleteTrashFiles.js +++ b/back/methods/dms/deleteTrashFiles.js @@ -51,7 +51,7 @@ module.exports = Self => { const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file); await fs.unlink(dstFile); } catch (err) { - if (err.code != 'ENOENT') + if (err.code != 'ENOENT' && dms.file) throw err; } From e7173fe15604ae68afdd9328065b857947715e9d Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 1 Dec 2022 11:59:30 +0100 Subject: [PATCH 2/2] fix: backTest --- back/methods/chat/spec/notifyIssue.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/chat/spec/notifyIssue.spec.js b/back/methods/chat/spec/notifyIssue.spec.js index e20d43142..1aab51793 100644 --- a/back/methods/chat/spec/notifyIssue.spec.js +++ b/back/methods/chat/spec/notifyIssue.spec.js @@ -27,7 +27,7 @@ describe('Chat notifyIssue()', () => { subject: 'Issue title'} ]); // eslint-disable-next-line max-len - const expectedMessage = `@all ➔ There's a new urgent ticket:\r\n[ID: *00001* - Issue title (@batman)](https://cau.verdnatura.es/scp/tickets.php?id=1)`; + const expectedMessage = `@all ➔ There's a new urgent ticket:\r\n[ID: 00001 - Issue title @batman](https://cau.verdnatura.es/scp/tickets.php?id=1)`; const department = await app.models.Department.findById(departmentId); let orgChatName = department.chatName;