fix: wrong condition

This commit is contained in:
Methapon2001 2024-08-14 20:32:24 +07:00
parent 5b75fe46b0
commit cb0ac4f0be

View file

@ -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;
}