mirror of
https://github.com/Readarr/Readarr
synced 2026-02-13 10:11:54 +01:00
Fixed: Command Inherited Properties not Saved to DB
This commit is contained in:
parent
3ae3c9dfc1
commit
b0e966418e
2 changed files with 8 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System.Data;
|
||||
using System.Data;
|
||||
using System.Text.Json;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Reflection;
|
||||
|
|
@ -35,7 +35,9 @@ public override Command Parse(object value)
|
|||
|
||||
public override void SetValue(IDbDataParameter parameter, Command value)
|
||||
{
|
||||
parameter.Value = value == null ? null : JsonSerializer.Serialize(value, SerializerSettings);
|
||||
// Cast to object to get all properties written out
|
||||
// https://github.com/dotnet/corefx/issues/38650
|
||||
parameter.Value = value == null ? null : JsonSerializer.Serialize((object)value, SerializerSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Data;
|
||||
using System.Data;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Dapper;
|
||||
|
|
@ -39,7 +39,9 @@ public EmbeddedDocumentConverter(params JsonConverter[] converters)
|
|||
|
||||
public override void SetValue(IDbDataParameter parameter, T value)
|
||||
{
|
||||
parameter.Value = JsonSerializer.Serialize(value, SerializerSettings);
|
||||
// Cast to object to get all properties written out
|
||||
// https://github.com/dotnet/corefx/issues/38650
|
||||
parameter.Value = JsonSerializer.Serialize((object)value, SerializerSettings);
|
||||
}
|
||||
|
||||
public override T Parse(object value)
|
||||
|
|
|
|||
Loading…
Reference in a new issue