Fixed: Prevent ProviderRepository to deserialize to a null config contract

pull/1485/head
Bogdan 2 years ago
parent b637733f68
commit 0e2cc7851f

@ -171,7 +171,6 @@ namespace NzbDrone.Core.ThingiProvider
definition.Message = provider.Message;
}
//TODO: Remove providers even if the ConfigContract can't be deserialized (this will fail to remove providers if the settings can't be deserialized).
private void RemoveMissingImplementations()
{
var storedProvider = _providerRepository.All();

@ -55,7 +55,7 @@ namespace NzbDrone.Core.ThingiProvider
var item = parser(reader);
var impType = typeof(IProviderConfig).Assembly.FindTypeByName(item.ConfigContract);
if (body.IsNullOrWhiteSpace())
if (body.IsNullOrWhiteSpace() || impType == null)
{
item.Settings = NullConfig.Instance;
}

Loading…
Cancel
Save