mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Fixed: Allow saving profiles with large negative CF scores
This commit is contained in:
@@ -32,7 +32,8 @@ namespace Radarr.Api.V3.Profiles.Quality
|
|||||||
}).WithMessage("All Custom Formats and no extra ones need to be present inside your Profile! Try refreshing your browser.");
|
}).WithMessage("All Custom Formats and no extra ones need to be present inside your Profile! Try refreshing your browser.");
|
||||||
SharedValidator.RuleFor(c => c).Custom((profile, context) =>
|
SharedValidator.RuleFor(c => c).Custom((profile, context) =>
|
||||||
{
|
{
|
||||||
if (profile.FormatItems.Sum(x => x.Score) < profile.MinFormatScore)
|
if (profile.FormatItems.Where(x => x.Score > 0).Sum(x => x.Score) < profile.MinFormatScore &&
|
||||||
|
profile.FormatItems.Max(x => x.Score) < profile.MinFormatScore)
|
||||||
{
|
{
|
||||||
context.AddFailure("Minimum Custom Format Score can never be satisfied");
|
context.AddFailure("Minimum Custom Format Score can never be satisfied");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user