Skip to content

Commit 91dc46a

Browse files
committed
fix: fixed conditional for parsing count query parameter
1 parent 45a4103 commit 91dc46a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GoatQuery.AspNetCore/src/Attributes/EnableQueryAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public override void OnActionExecuted(ActionExecutedContext context)
4747
queryString.TryGetValue("count", out var countQuery);
4848
var countString = countQuery.ToString();
4949

50-
if (bool.TryParse(countString, out bool count) && !string.IsNullOrEmpty(countString))
50+
if (!bool.TryParse(countString, out bool count) && !string.IsNullOrEmpty(countString))
5151
{
5252
context.Result = new BadRequestObjectResult(new { Message = "The query parameter 'Count' could not be parsed to a boolean" });
5353
return;

0 commit comments

Comments
 (0)