From 9833a0f45da7741497fe2dceafa54c6e99466b06 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 5 Oct 2021 09:19:47 -0700 Subject: [PATCH] Fixed: Release profiles not saving if Must (Not) Contain is empty (cherry picked from commit 0abd52d6beba82f9c9af0d6469aa1a7157128537) --- .../Release/EditReleaseProfileModalContentConnector.js | 4 ++-- frontend/src/Settings/Profiles/Release/ReleaseProfile.js | 4 ++-- src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileResource.cs | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/Settings/Profiles/Release/EditReleaseProfileModalContentConnector.js b/frontend/src/Settings/Profiles/Release/EditReleaseProfileModalContentConnector.js index 7c9177194..b31e86eec 100644 --- a/frontend/src/Settings/Profiles/Release/EditReleaseProfileModalContentConnector.js +++ b/frontend/src/Settings/Profiles/Release/EditReleaseProfileModalContentConnector.js @@ -9,8 +9,8 @@ import EditReleaseProfileModalContent from './EditReleaseProfileModalContent'; const newReleaseProfile = { enabled: true, - required: '', - ignored: '', + required: [], + ignored: [], preferred: [], includePreferredWhenRenaming: false, tags: [], diff --git a/frontend/src/Settings/Profiles/Release/ReleaseProfile.js b/frontend/src/Settings/Profiles/Release/ReleaseProfile.js index 86901f8ee..b1e0693b0 100644 --- a/frontend/src/Settings/Profiles/Release/ReleaseProfile.js +++ b/frontend/src/Settings/Profiles/Release/ReleaseProfile.js @@ -197,8 +197,8 @@ ReleaseProfile.propTypes = { ReleaseProfile.defaultProps = { enabled: true, - required: '', - ignored: '', + required: [], + ignored: [], preferred: [], indexerId: 0 }; diff --git a/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileResource.cs b/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileResource.cs index 203186fa5..c66941b31 100644 --- a/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileResource.cs +++ b/src/Lidarr.Api.V1/Profiles/Release/ReleaseProfileResource.cs @@ -17,6 +17,9 @@ namespace Lidarr.Api.V1.Profiles.Release public ReleaseProfileResource() { + Required = new List(); + Ignored = new List(); + Preferred = new List>(); Tags = new HashSet(); } }