diff --git a/src/Sonarr.Api.V3/Profiles/Release/ReleaseProfileModule.cs b/src/Sonarr.Api.V3/Profiles/Release/ReleaseProfileModule.cs index 1d6c75ab0..ed8587083 100644 --- a/src/Sonarr.Api.V3/Profiles/Release/ReleaseProfileModule.cs +++ b/src/Sonarr.Api.V3/Profiles/Release/ReleaseProfileModule.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using FluentValidation; using FluentValidation.Results; using NzbDrone.Common.Extensions; @@ -36,6 +37,11 @@ namespace Sonarr.Api.V3.Profiles.Release { context.AddFailure(nameof(ReleaseProfile.IndexerId), "Indexer does not exist"); } + + if (restriction.Preferred.Any(p => p.Key.IsNullOrWhiteSpace())) + { + context.AddFailure("Preferred", "Term cannot be empty or consist of only spaces"); + } }); }