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)