From 9ba31d40eb9f9d44fc60bbd6a70d5fd5aa5b5277 Mon Sep 17 00:00:00 2001 From: adisak Date: Tue, 21 Oct 2025 15:27:41 +0700 Subject: [PATCH] #1888 --- src/controllers/OrganizationDotnetController.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index fb615566..67d39ed8 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -4389,7 +4389,7 @@ export class OrganizationDotnetController extends Controller { }, ) { let typeCondition: any = {}; - if (body.role === "CHILD" || body.role === "PARENT" || body.role === "ROOT") { + if (body.role === "CHILD" || body.role === "PARENT") { switch (body.node) { case 0: typeCondition = { @@ -4516,6 +4516,12 @@ export class OrganizationDotnetController extends Controller { typeCondition = {}; break; } + } else if (body.role === "ROOT") { + typeCondition = { + orgRoot: { + ancestorDNA: body.nodeId, + }, + }; } let profile = await this.profileRepo.find({