fix bug: add ancestorDNA org all leavel
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s

This commit is contained in:
Warunee Tamkoo 2026-02-12 15:39:16 +07:00
parent 82ecf2cb81
commit d916334537
5 changed files with 15 additions and 0 deletions

View file

@ -203,6 +203,9 @@ export class OrgRootController extends Controller {
orgRoot.lastUpdatedAt = new Date();
orgRoot.orgRootOrder = order == null || order.orgRootOrder == null ? 1 : order.orgRootOrder + 1;
await this.orgRootRepository.save(orgRoot, { data: request });
// update ancestorDNA = id row
orgRoot.ancestorDNA = orgRoot.id;
await this.orgRootRepository.save(orgRoot, { data: request });
setLogDataDiff(request, { before, after: orgRoot });
return new HttpSuccess();