mirror of
https://github.com/Radarr/Radarr
synced 2025-02-23 14:51:17 +00:00
Don't replace private values that haven't been set
(cherry picked from commit 52760e0908fa9852ed8a770f1916bb582eb8c8b4)
This commit is contained in:
parent
508a15e09a
commit
0c6eae256b
1 changed files with 3 additions and 5 deletions
|
@ -27,15 +27,13 @@ public static List<Field> 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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue