diff --git a/back/src/Kyoo.Abstractions/Models/Patch.cs b/back/src/Kyoo.Abstractions/Models/Patch.cs index 608b3f61..305a76fb 100644 --- a/back/src/Kyoo.Abstractions/Models/Patch.cs +++ b/back/src/Kyoo.Abstractions/Models/Patch.cs @@ -24,7 +24,7 @@ using Newtonsoft.Json.Linq; namespace Kyoo.Models; -public class Patch : Dictionary +public class Patch : Dictionary where T : class, IResource { public Guid? Id => this.GetValueOrDefault(nameof(IResource.Id))?.ToObject(); @@ -33,7 +33,7 @@ public class Patch : Dictionary public T Apply(T current) { - foreach ((string property, JObject value) in this) + foreach ((string property, JToken value) in this) { PropertyInfo prop = typeof(T).GetProperty( property,