From c45db7332d06200a0434f47ae209e28a68e35322 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 28 Oct 2024 09:35:36 +0700 Subject: [PATCH] fix: error when no branch is found --- src/controllers/05-quotation-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index cf6b6cc..05a3108 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -570,7 +570,7 @@ export class QuotationController extends Controller { const [customerBranch, employee, product, work, service] = await prisma.$transaction( async (tx) => await Promise.all([ - tx.customerBranch.findUnique({ + tx.customerBranch.findFirst({ include: { customer: { include: {