diff --git a/src/controllers/03-customer-controller.ts b/src/controllers/03-customer-controller.ts index 9af0a15..b2c4545 100644 --- a/src/controllers/03-customer-controller.ts +++ b/src/controllers/03-customer-controller.ts @@ -336,7 +336,9 @@ export class CustomerController extends Controller { ); } - await permissionCheck(req.user, customer.registeredBranch); + if (customer.registeredBranch) { + await permissionCheck(req.user, customer.registeredBranch); + } if (body.registeredBranchId !== undefined && branch) { await permissionCheck(req.user, branch);