diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index 78764963b..a3411fc42 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -548,13 +548,13 @@ public class AuditDocumentService(IRepository _auditDocumentRepos void findParent(List allId, List current, List data) { allId.AddRange(current); - var parent = data.Where(x => current.Contains(x.Id)).Select(x => x.Id).ToList(); + var parent = data.Where(x => current.Contains(x.Id)).Select(x => x.ParentId).Where(x=>x!=null).Select(x=>(Guid)x).ToList(); if (parent.Count() > 0) { - findChild(allId, parent, data); + findParent(allId, parent, data); } }