mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Better message handling on save
This commit is contained in:
parent
03c085030e
commit
ef58acb4b5
7 changed files with 63 additions and 64 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue