mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Allow 0 as value in download client Id validation
This commit is contained in:
@@ -16,7 +16,12 @@ namespace NzbDrone.Core.Validation
|
|||||||
|
|
||||||
protected override bool IsValid(PropertyValidatorContext context)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user