From ea9494019e87782f7a320554bb670d422ddf64c8 Mon Sep 17 00:00:00 2001 From: ta264 Date: Sat, 29 Feb 2020 15:35:00 +0000 Subject: [PATCH] Fixed: Allow saving profiles with large negative CF scores --- src/Radarr.Api.V3/Profiles/Quality/QualityProfileModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Radarr.Api.V3/Profiles/Quality/QualityProfileModule.cs b/src/Radarr.Api.V3/Profiles/Quality/QualityProfileModule.cs index 2ffb1d5bb..51da31fac 100644 --- a/src/Radarr.Api.V3/Profiles/Quality/QualityProfileModule.cs +++ b/src/Radarr.Api.V3/Profiles/Quality/QualityProfileModule.cs @@ -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."); 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"); }