Fix nullable Json field in reprocess and Prisma import path

Use Prisma.DbNull instead of null for the cardIds Json? field,
and correct the generated client import path.

Made-with: Cursor
This commit is contained in:
Randall Stillwell 2026-03-11 11:49:33 -05:00
parent 77b9fbea4c
commit eabfb4935d

View file

@ -1,4 +1,5 @@
import { prisma } from "./db"; import { prisma } from "./db";
import { Prisma } from "@/generated/prisma/client";
import { uploadBuffer, getBuffer, deleteObject } from "./minio"; import { uploadBuffer, getBuffer, deleteObject } from "./minio";
import { ocrImage } from "./ai-ocr"; import { ocrImage } from "./ai-ocr";
import { pdfToImages, imageToBase64, processUploadedImage } from "./pdf"; import { pdfToImages, imageToBase64, processUploadedImage } from "./pdf";
@ -266,7 +267,7 @@ export async function reprocessJob(jobId: string): Promise<void> {
await prisma.processingJob.update({ await prisma.processingJob.update({
where: { id: jobId }, where: { id: jobId },
data: { status: "queued", processed: 0, error: null, cardIds: null }, data: { status: "queued", processed: 0, error: null, cardIds: Prisma.DbNull },
}); });
await processFile(jobId, job.fileName, fileBuffer, isPdf); await processFile(jobId, job.fileName, fileBuffer, isPdf);