Fixed: Validation inheritance

This commit is contained in:
Bogdan
2023-01-19 04:52:04 +02:00
committed by Qstick
parent 27094ccf62
commit d6b379df64
31 changed files with 120 additions and 111 deletions
@@ -1168,7 +1168,7 @@ namespace NzbDrone.Core.Indexers.Definitions
public class NzbIndexSettings : IIndexerSettings
{
private static readonly NzbIndexSettingsValidator Validator = new NzbIndexSettingsValidator();
private static readonly NzbIndexSettingsValidator Validator = new ();
public NzbIndexSettings()
{
@@ -1182,7 +1182,9 @@ namespace NzbDrone.Core.Indexers.Definitions
public string ApiKey { get; set; }
[FieldDefinition(3)]
public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings(); public NzbDroneValidationResult Validate()
public IndexerBaseSettings BaseSettings { get; set; } = new ();
public NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}