From aaffdbb450a3dcab65fc98c51fa8aa5d060ac4e4 Mon Sep 17 00:00:00 2001 From: Jakob Helgesson Date: Fri, 15 Nov 2024 18:26:59 +0700 Subject: [PATCH] Patch checker logic --- backend/src/checker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/checker.ts b/backend/src/checker.ts index 784a83b..3b391b6 100644 --- a/backend/src/checker.ts +++ b/backend/src/checker.ts @@ -1,4 +1,4 @@ -import { and, eq } from "drizzle-orm"; +import { and, eq, isNull, or } from "drizzle-orm"; import { db } from "./db"; import { links, links as linksTable } from "./db/schema"; import { batcher } from "./util/batch"; @@ -36,7 +36,7 @@ export const checkClaims = async ( emit("Checking POAP claims"); const usedLinks = await db.query.links.findMany({ - where: eq(linksTable.claimed, false), + where: or(eq(linksTable.claimed, false), isNull(linksTable.claimed)), }); const batches = batcher(usedLinks, 10);