diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index fd3020e4..edb35874 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -6557,7 +6557,7 @@ export class OrganizationController extends Controller { const formattedData = await Promise.all( orgRootData.map(async (orgRoot) => { return { - orgTreeId: orgRoot.ancestorDNA, + orgTreeId: orgRoot.id, orgTreeDnaId: orgRoot.ancestorDNA, orgLevel: 0, orgName: orgRoot.orgRootName, @@ -6666,7 +6666,7 @@ export class OrganizationController extends Controller { orgChild1Data .filter((orgChild1) => orgChild1.orgRootId === orgRoot.id) .map(async (orgChild1) => ({ - orgTreeId: orgChild1.ancestorDNA, + orgTreeId: orgChild1.id, orgTreeDnaId: orgChild1.ancestorDNA, orgRootId: orgRoot.id, orgRootDnaId: orgRoot.ancestorDNA, @@ -6790,7 +6790,7 @@ export class OrganizationController extends Controller { orgChild2Data .filter((orgChild2) => orgChild2.orgChild1Id === orgChild1.id) .map(async (orgChild2) => ({ - orgTreeId: orgChild2.ancestorDNA, + orgTreeId: orgChild2.id, orgTreeDnaId: orgChild2.ancestorDNA, orgRootId: orgChild1.id, orgRootDnaId: orgChild1.ancestorDNA, @@ -6924,7 +6924,7 @@ export class OrganizationController extends Controller { orgChild3Data .filter((orgChild3) => orgChild3.orgChild2Id === orgChild2.id) .map(async (orgChild3) => ({ - orgTreeId: orgChild3.ancestorDNA, + orgTreeId: orgChild3.id, orgTreeDnaId: orgChild3.ancestorDNA, orgRootId: orgChild2.id, orgRootDnaId: orgChild2.ancestorDNA, @@ -7065,7 +7065,7 @@ export class OrganizationController extends Controller { orgChild4Data .filter((orgChild4) => orgChild4.orgChild3Id === orgChild3.id) .map(async (orgChild4) => ({ - orgTreeId: orgChild4.ancestorDNA, + orgTreeId: orgChild4.id, orgTreeDnaId: orgChild4.ancestorDNA, orgRootId: orgChild3.id, orgRootDnaId: orgChild3.ancestorDNA,