Notifications wired up

This commit is contained in:
Mark McDowall 2013-05-28 19:49:17 -07:00
parent e4410d8cb7
commit 1d007be8fd
11 changed files with 174 additions and 64 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using NzbDrone.Common.Reflection;
using NzbDrone.Core.Annotations;
@ -17,7 +18,17 @@ namespace NzbDrone.Api.ClientSchema
if (fieldAttribute != null)
{
var field = fields.Find(f => f.Name == propertyInfo.Name);
propertyInfo.SetValue(model, field.Value, null);
if (propertyInfo.PropertyType == typeof (Int32))
{
var intValue = Convert.ToInt32(field.Value);
propertyInfo.SetValue(model, intValue, null);
}
else
{
propertyInfo.SetValue(model, field.Value, null);
}
}
}