Skip to content

Commit 15725f5

Browse files
committed
Fix error in GriddlyParameterAttribute when parameter is a model class
1 parent d5bdf61 commit 15725f5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Build/CommonAssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
//
1616
// You can specify all the values or you can default the Revision and Build Numbers
1717
// by using the '*' as shown below:
18-
[assembly: AssemblyVersion("3.2.7")]
19-
[assembly: AssemblyFileVersion("3.2.7")]
18+
[assembly: AssemblyVersion("3.2.8")]
19+
[assembly: AssemblyFileVersion("3.2.8")]
2020
//[assembly: AssemblyInformationalVersion("2.5-filters")]

Griddly.Mvc/GriddlyParameterAttribute.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Newtonsoft.Json;
22
using System;
3+
using System.Collections;
34
using System.Collections.Generic;
45
using System.Linq;
56
using System.Text;
@@ -34,7 +35,7 @@ public override void OnActionExecuting(ActionExecutingContext filterContext)
3435

3536
foreach (var param in filterContext.ActionParameters.ToList())
3637
{
37-
if (param.Value != null)
38+
if (param.Value != null && (param.Value.GetType().IsValueType || typeof(IEnumerable).IsAssignableFrom(param.Value.GetType())))
3839
{
3940
bool isParamSet = context.CookieData?.Values?.ContainsKey(param.Key) == true || parentKeys.Contains(param.Key) || filterContext.RouteData.Values.ContainsKey(param.Key);
4041

0 commit comments

Comments
 (0)