Projections: Returning empty list of content items instead of every content item when the query has no filters

This commit is contained in:
Benedek Farkas 2024-11-27 17:38:39 +01:00
parent 81570fab35
commit 5114f91526

View File

@ -140,6 +140,11 @@ namespace Orchard.Projections.Services {
var contentItems = new List<ContentItem>();
// If there are no filters, return the empty list of content items instead of returning all content items.
if (queryRecord.FilterGroups.SelectMany(group => group.Filters).Count() == 0) {
return contentItems;
}
// prepares tokens
Dictionary<string, object> tokens = new Dictionary<string, object>();
if (part != null) {