Better message handling on save

This commit is contained in:
Mark McDowall 2013-05-31 17:22:47 -07:00
commit ef58acb4b5
7 changed files with 63 additions and 64 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using NzbDrone.Common;
using NzbDrone.Common.Reflection;
using NzbDrone.Core.Annotations;
@ -25,6 +26,12 @@ namespace NzbDrone.Api.ClientSchema
propertyInfo.SetValue(model, intValue, null);
}
else if (propertyInfo.PropertyType == typeof(Nullable<Int32>))
{
var intValue = field.Value.ToString().ParseInt32();
propertyInfo.SetValue(model, intValue, null);
}
else
{
propertyInfo.SetValue(model, field.Value, null);