diff --git a/src/controllers/branch-controller.ts b/src/controllers/branch-controller.ts index 26c054f..bf7d721 100644 --- a/src/controllers/branch-controller.ts +++ b/src/controllers/branch-controller.ts @@ -200,13 +200,15 @@ export class BranchController extends Controller { district: true, subDistrict: true, contact: true, - branch: tree && { - include: { - province: true, - district: true, - subDistrict: true, - }, - }, + branch: tree + ? { + include: { + province: true, + district: true, + subDistrict: true, + }, + } + : false, bank: true, _count: { select: { branch: true },