Skip to content

Commit

Permalink
Update pollOutstandingScans.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
azdak committed Nov 21, 2024
1 parent 704bcea commit 1e21fc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/pollOutstandingScans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const pollOutstandingScans = async ({ request, reply }) => {
failedJobs.push(job.job_id)
}
else if (['completed'].includes(status)) {
if(result == null){ // if result is complete but the data is empty, set processing to false;
if(result == null || result == "null" || result == undefined){ // if result is complete but the data is empty, set processing to false;
await db.query({
text: `UPDATE "scans" SET "processing"=FALSE, "results"=$1 WHERE "job_id"=$2`,
values: [result, job.job_id],
Expand Down

0 comments on commit 1e21fc4

Please sign in to comment.