IO-2002 Keep manual lines on supplement.

This commit is contained in:
Patrick Fic
2022-07-27 13:09:33 -07:00
parent 4ef68a0e26
commit e379ecfba6
3 changed files with 13 additions and 16 deletions

View File

@@ -45,9 +45,11 @@ export const GetSupplementDelta = async (client, jobId, newLines) => {
return acc + generateUpdateQuery(value, idx);
}, "");
const removeQueries = existingLines.reduce((acc, value, idx) => {
return acc + generateRemoveQuery(value, idx);
}, "");
const removeQueries = existingLines
.filter((l) => !l.manual_line)
.reduce((acc, value, idx) => {
return acc + generateRemoveQuery(value, idx);
}, "");
console.log(insertQueries, updateQueries, removeQueries);
if ((insertQueries + updateQueries + removeQueries).trim() === "") {