From a47f07110a22f2ab951a64dbd458149f181b22d2 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 20 Feb 2024 16:12:59 +0700 Subject: [PATCH] fix bug --- src/controllers/ProfileController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 7462474a..e62eaa47 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -155,7 +155,10 @@ export class ProfileController extends Controller { } const checkCitizenId = await this.profileRepository.findOne({ - where: { citizenId: requestBody.citizenId }, + where: { + id: Not(id), + citizenId: requestBody.citizenId , + }, }); if (checkCitizenId) {