mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-08-20 07:23:59 +08:00
Projections: Returning empty list of content items instead of every content item when the query has no filters
This commit is contained in:
parent
81570fab35
commit
5114f91526
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user