1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-07-07 04:19:25 +02:00

Fixed: NullRef in SchemaBuilder when sending payload without optional Provider.Settings fields

This commit is contained in:
Qstick 2021-12-20 20:38:16 -06:00
parent 2ae7371d73
commit b2195148a2

View File

@ -47,7 +47,10 @@ public static object ReadFromSchema(List<Field> fields, Type targetType)
var propertyType = mapping.PropertyType;
var field = fields.Find(f => f.Name == mapping.Field.Name);
mapping.SetterFunc(target, field.Value);
if (field != null)
{
mapping.SetterFunc(target, field.Value);
}
}
return target;