From cb0ac4f0be6cc28b2c7030d0a2ca2edb6254310e Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 14 Aug 2024 20:32:24 +0700 Subject: [PATCH] fix: wrong condition --- src/controllers/user-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/user-controller.ts b/src/controllers/user-controller.ts index 391df2e..c3878ab 100644 --- a/src/controllers/user-controller.ts +++ b/src/controllers/user-controller.ts @@ -569,7 +569,7 @@ export class UserController extends Controller { }), ]); - if (branch[0]?.id !== user.branch[0]?.id) { + if (branch[0]?.id !== user.branch[0]?.branchId) { const updated = await userBranchCodeGen(user, branch[0]); record.code = updated.code; }