diff --git a/src/Readarr.Api.V1/Profiles/Release/ReleaseProfileController.cs b/src/Readarr.Api.V1/Profiles/Release/ReleaseProfileController.cs index 2ea3d8466..c211d9763 100644 --- a/src/Readarr.Api.V1/Profiles/Release/ReleaseProfileController.cs +++ b/src/Readarr.Api.V1/Profiles/Release/ReleaseProfileController.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using FluentValidation; using Microsoft.AspNetCore.Mvc; using NzbDrone.Common.Extensions; @@ -32,6 +33,11 @@ public ReleaseProfileController(IReleaseProfileService releaseProfileService, II { 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"); + } }); }