diff --git a/back/methods/edi/updateData.js b/back/methods/edi/updateData.js index 3dae2d47d..121e96778 100644 --- a/back/methods/edi/updateData.js +++ b/back/methods/edi/updateData.js @@ -200,31 +200,6 @@ module.exports = Self => { const toTable = table.toTable; const baseName = table.fileName; - const firstEntry = entries[0]; - const entryName = firstEntry.entryName; - const startIndex = (entryName.length - 10); - const endIndex = (entryName.length - 4); - const dateString = entryName.substring(startIndex, endIndex); - - const lastUpdated = new Date(); - - let updated = null; - if (file.updated) { - updated = new Date(file.updated); - updated.setHours(0, 0, 0, 0); - } - - // Format string date to a date object - lastUpdated.setFullYear(`20${dateString.substring(4, 6)}`); - lastUpdated.setMonth(parseInt(dateString.substring(2, 4)) - 1); - lastUpdated.setDate(dateString.substring(0, 2)); - lastUpdated.setHours(0, 0, 0, 0); - - if (updated && lastUpdated <= updated) { - console.debug(`Table ${toTable} already updated, skipping...`); - return; - } - const tx = await Self.beginTransaction({}); try {