From ceab19caf906a450bf070253142c46a45274898c Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 30 Sep 2019 19:44:23 -0400 Subject: [PATCH] Fixed: Provider health checks persist after add until next scheduled check (cherry picked from commit 202449c40c82c6dfd2d15844c578436bbe3c8872) --- src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs index 53ecb9a56..c23d9fed5 100644 --- a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs +++ b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs @@ -98,9 +98,10 @@ namespace NzbDrone.Core.ThingiProvider public virtual TProviderDefinition Create(TProviderDefinition definition) { - var addedDefinition = _providerRepository.Insert(definition); - _eventAggregator.PublishEvent(new ProviderAddedEvent(definition)); - return addedDefinition; + var result = _providerRepository.Insert(definition); + _eventAggregator.PublishEvent(new ProviderAddedEvent(result)); + + return result; } public virtual void Update(TProviderDefinition definition)