1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 18:02:44 +01:00

Fixed force saving provider triggering testing

(cherry picked from commit 65cb1ccafd54479fa3fca1f1eaa4b96222b0176b)
This commit is contained in:
Mark McDowall 2023-11-19 21:02:28 -08:00 committed by Bogdan
parent ed54d071c4
commit 318d59bb99

View File

@ -94,8 +94,8 @@ public ActionResult<TProviderResource> UpdateProvider([FromBody] TProviderResour
var hasDefinitionChanged = STJson.ToJson(existingDefinition) != STJson.ToJson(providerDefinition) ||
STJson.ToJson(existingDefinition.Settings) != STJson.ToJson(providerDefinition.Settings);
// Only test existing definitions if it is enabled and forceSave isn't set or the definition has changed.
if (providerDefinition.Enable && (!forceSave || hasDefinitionChanged))
// Only test existing definitions if it is enabled and forceSave isn't set and the definition has changed.
if (providerDefinition.Enable && !forceSave && hasDefinitionChanged)
{
Test(providerDefinition, true);
}