mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-17 21:26:13 -04:00
Don't replace private values that haven't been set
This commit is contained in:
@@ -27,15 +27,13 @@ namespace Sonarr.Http.ClientSchema
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user