diff --git a/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileModule.cs b/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileModule.cs index 9718c6728..1f7ca6daf 100644 --- a/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileModule.cs +++ b/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileModule.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using FluentValidation; using Lidarr.Http; using NzbDrone.Common.Extensions; @@ -34,6 +35,11 @@ namespace Lidarr.Api.V1.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"); + } }); }