Fixes an exception caused by null values in query filter builder
This commit is contained in:
parent
d55b6eea02
commit
80219867df
|
@ -20,7 +20,7 @@ public abstract class AttributedQueryFilterBuilder : IQueryFilterBuilder
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var paramName = attribute.ParamName ?? propertyInfo.Name;
|
var paramName = attribute.ParamName ?? propertyInfo.Name;
|
||||||
var value = propertyInfo.GetValue(this).ToString();
|
var value = propertyInfo.GetValue(this)?.ToString();
|
||||||
if (!string.IsNullOrEmpty(value)) filterBucket.Add(new KeyValuePair<string, string>(paramName, value));
|
if (!string.IsNullOrEmpty(value)) filterBucket.Add(new KeyValuePair<string, string>(paramName, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue