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({