test parent

This commit is contained in:
mamoss 2025-10-12 16:51:21 +07:00
parent e23d89c9cd
commit bfea0438f8
3 changed files with 4 additions and 4 deletions

View file

@ -105,7 +105,7 @@ export class OrganizationDotnetController extends Controller {
condition = "orgRoot.ancestorDNA = :nodeId";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "PARENT") {
condition = "orgChild1.ancestorDNA = :nodeId";
condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "NORMAL") {
switch (body.node) {
@ -224,7 +224,7 @@ export class OrganizationDotnetController extends Controller {
condition = "orgRoot.ancestorDNA = :nodeId";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "PARENT") {
condition = "orgChild1.ancestorDNA = :nodeId";
condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "NORMAL") {
switch (body.node) {