Skip to content

Commit

Permalink
fix: bug in the handling of numeric values in 'In'-filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaensen committed Nov 6, 2024
1 parent 5932996 commit b7c551f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Circles.Index.Query/FilterPredicate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ private IEnumerable<object> ConvertToEnumerable(object? value)
{
if (value is JsonElement jsonElement && jsonElement.ValueKind == JsonValueKind.Array)
{
return jsonElement.EnumerateArray().Select(v => (object)v.ToString());
return jsonElement.EnumerateArray().Select(v =>
{
if (v.ValueKind == JsonValueKind.Number)
{
return v.GetDouble();
}

return (object)v.ToString();
});
}

if (value is IEnumerable e && value is not string)
Expand Down
4 changes: 2 additions & 2 deletions Circles.Index/Circles.Index.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Authors>Daniel Janz (Gnosis Service GmbH)</Authors>
<Copyright>Gnosis Service GmbH</Copyright>
<Product>Circles</Product>
<AssemblyVersion>1.11.1</AssemblyVersion>
<FileVersion>1.11.1</FileVersion>
<AssemblyVersion>1.11.2</AssemblyVersion>
<FileVersion>1.11.2</FileVersion>
</PropertyGroup>


Expand Down

0 comments on commit b7c551f

Please sign in to comment.