only include pages in index if they do not have any modules

This commit is contained in:
sbwalker 2024-07-12 10:52:58 -04:00
parent bb79b9ed74
commit 938eee80a9

View File

@ -97,7 +97,7 @@ namespace Oqtane.Infrastructure
ContentModifiedOn = page.ModifiedOn,
AdditionalContent = string.Empty,
CreatedOn = DateTime.UtcNow,
IsDeleted = removed,
IsDeleted = (removed || pageModules.Any(item => item.PageId == page.PageId)),
TenantId = tenantId
};
searchContents.Add(searchContent);