Skip to content

Commit

Permalink
move logic to applyFixes
Browse files Browse the repository at this point in the history
  • Loading branch information
horrible-little-slime committed Jun 20, 2024
1 parent db758d2 commit 27883d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/excavator-web/etl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ function applyFixes(data: SpadingData) {
data["source"] = "Unknown";
}

const project = projects.find(({ name }) => name === data._PROJECT);
if (project?.completed) return null;

return data;
}

Expand Down Expand Up @@ -164,9 +167,6 @@ async function main() {

const { _PROJECT, _VERSION, ...data } = fixed;

if (projects.find((project) => project.name === _PROJECT)?.completed)
continue;

const id = Number(kmail.id);

await prisma.spadingData.upsert({
Expand Down

0 comments on commit 27883d4

Please sign in to comment.