From 2ba5ac41c451e61ee7d9114e7ac179c56e5587b3 Mon Sep 17 00:00:00 2001 From: kittapath Date: Mon, 3 Feb 2025 15:09:47 +0700 Subject: [PATCH] search --- src/controllers/KpiPlanController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/KpiPlanController.ts b/src/controllers/KpiPlanController.ts index 2cb48a6..259445d 100644 --- a/src/controllers/KpiPlanController.ts +++ b/src/controllers/KpiPlanController.ts @@ -53,7 +53,7 @@ export class kpiPlanController extends Controller { async createKpiPlan(@Body() requestBody: createKpiPlan, @Request() request: RequestWithUser) { await new permission().PermissionCreate(request, "SYS_EVA_INDICATOR"); const kpiPlan = Object.assign(new KpiPlan(), requestBody); - if (requestBody.year != null && requestBody.period != null) { + if (requestBody.period != null) { const kpiPeriod = await this.kpiPeriodRepository .createQueryBuilder("kpiPeriod") .where("kpiPeriod.year = :year", { year: requestBody.year })