From 25adeb39ebc59f7a38a065773bcc39277d1df05a Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 13 May 2024 13:17:23 +0700 Subject: [PATCH] fix --- src/controllers/KpiReasonController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/KpiReasonController.ts b/src/controllers/KpiReasonController.ts index 0c34e40..e3f156c 100644 --- a/src/controllers/KpiReasonController.ts +++ b/src/controllers/KpiReasonController.ts @@ -75,8 +75,9 @@ export class kpiReasonController extends Controller { if (user.trim().toUpperCase() == "USER") { const kpiUserEvaluation = await this.kpiUserPlan.findOne({ where: { id: id }, - relations: ["kpiUserEvaluation", "kpiUserEvaluation.evaluatorId"], + relations: ["kpiUserEvaluation"], }); + if (!kpiUserEvaluation) { throw new HttpError( HttpStatusCode.NOT_FOUND,