mirror of
https://github.com/Biarity/Sieve.git
synced 2025-08-17 22:55:32 +02:00
Fix issue where the order of Filter expressions changed the result.
The following filter criteria should result in the same output, but does not: "CategoryId==1,(CategoryId|LikeCount)==50" "(CategoryId|LikeCount)==50,CategoryId==1" Cause is an optimization which removes or statements if one term was already added in another statement. This optimization causes a wrong result.
This commit is contained in:
@@ -44,10 +44,7 @@ namespace Sieve.Models
|
||||
{
|
||||
Filter = subfilters + filterOpAndVal
|
||||
};
|
||||
if (!value.Any(f => f.Names.Any(n => filterTerm.Names.Any(n2 => n2 == n))))
|
||||
{
|
||||
value.Add(filterTerm);
|
||||
}
|
||||
value.Add(filterTerm);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user