diff --git a/src/Radarr.Http/ClientSchema/SchemaBuilder.cs b/src/Radarr.Http/ClientSchema/SchemaBuilder.cs index 66d610ceb..1d5856bad 100644 --- a/src/Radarr.Http/ClientSchema/SchemaBuilder.cs +++ b/src/Radarr.Http/ClientSchema/SchemaBuilder.cs @@ -27,15 +27,13 @@ public static List ToSchema(object model) foreach (var mapping in mappings) { var field = mapping.Field.Clone(); + field.Value = mapping.GetterFunc(model); - if (field.Privacy == PrivacyLevel.ApiKey || field.Privacy == PrivacyLevel.Password) + if (field.Value != null && !field.Value.Equals(string.Empty) && + (field.Privacy == PrivacyLevel.ApiKey || field.Privacy == PrivacyLevel.Password)) { field.Value = PRIVATE_VALUE; } - else - { - field.Value = mapping.GetterFunc(model); - } result.Add(field); }