mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-18 19:00:47 +02:00
Allow 0 as value in download client Id validation
This commit is contained in:
parent
203e2dbb10
commit
2c6c0fcc81
1 changed files with 6 additions and 1 deletions
|
|
@ -16,7 +16,12 @@ public DownloadClientExistsValidator(IDownloadClientFactory downloadClientFactor
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue