Allow 0 as value in download client Id validation

This commit is contained in:
Bogdan 2023-10-25 17:11:48 +03:00
parent 203e2dbb10
commit 2c6c0fcc81

View file

@ -16,7 +16,12 @@ namespace NzbDrone.Core.Validation
protected override bool IsValid(PropertyValidatorContext context)
{
return context?.PropertyValue == null || _downloadClientFactory.Exists((int)context.PropertyValue);
if (context?.PropertyValue == null || (int)context.PropertyValue == 0)
{
return true;
}
return _downloadClientFactory.Exists((int)context.PropertyValue);
}
}
}