Reverting functional change to ignore empty filter groups

This commit is contained in:
Benedek Farkas 2024-12-07 12:39:10 +01:00
parent 2234501139
commit 69607fd9de

View File

@ -205,8 +205,8 @@ namespace Orchard.Projections.Services {
var version = queryRecord.VersionScope.ToVersionOptions();
// Iterate over each filter group, but ignore empty ones, because they'd cause all content items to be returned.
foreach (var group in queryRecord.FilterGroups.Where(group => group.Filters.Count > 0)) {
// Iterate over each filter group and evaluate the filters.
foreach (var group in queryRecord.FilterGroups) {
var contentQuery = _contentManager.HqlQuery().ForVersion(version);
// Iterate over each filter to apply the alterations to the query object.