Merge pull request #14094 from allesmi/fix/ancestor-ids-parent-child-relation

Translate query by AncestorIds correctly
This commit is contained in:
Alexander Miller
2025-05-15 11:48:20 +02:00
committed by GitHub
parent 265cc50144
commit 29fc7711a1
2 changed files with 2 additions and 1 deletions

View File

@@ -2191,7 +2191,7 @@ public sealed class BaseItemRepository
if (filter.AncestorIds.Length > 0)
{
baseQuery = baseQuery.Where(e => e.Children!.Any(f => filter.AncestorIds.Contains(f.ItemId)));
baseQuery = baseQuery.Where(e => e.Parents!.Any(f => filter.AncestorIds.Contains(f.ParentItemId)));
}
if (!string.IsNullOrWhiteSpace(filter.AncestorWithPresentationUniqueKey))