Skip to content

Commit

Permalink
Fixed: API error when sending payload without optional parameters
Browse files Browse the repository at this point in the history
Co-authored-by: Qstick <qstick@gmail.com>

(cherry picked from commit 8d83b1d8d66ef24a25f312bdeac1e5625a630c00)
  • Loading branch information
bakerboy448 committed Apr 6, 2022
1 parent 1076047 commit f341714
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Readarr.Http/ClientSchema/SchemaBuilder.cs
Expand Up @@ -46,7 +46,10 @@ public static object ReadFromSchema(List<Field> fields, Type targetType)
{
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;
Expand Down

0 comments on commit f341714

Please sign in to comment.