From 2dec783272409799fced8d7c2260e1bb5781ba51 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 12 Jul 2024 16:30:40 +0300 Subject: [PATCH] Fixed: Creating root folders without default tags Fixes #4898 --- src/Lidarr.Api.V1/RootFolders/RootFolderResource.cs | 2 +- src/NzbDrone.Core/RootFolders/RootFolder.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Lidarr.Api.V1/RootFolders/RootFolderResource.cs b/src/Lidarr.Api.V1/RootFolders/RootFolderResource.cs index 6684ce3dd..c9ac64dd4 100644 --- a/src/Lidarr.Api.V1/RootFolders/RootFolderResource.cs +++ b/src/Lidarr.Api.V1/RootFolders/RootFolderResource.cs @@ -67,7 +67,7 @@ namespace Lidarr.Api.V1.RootFolders DefaultQualityProfileId = resource.DefaultQualityProfileId, DefaultMonitorOption = resource.DefaultMonitorOption, DefaultNewItemMonitorOption = resource.DefaultNewItemMonitorOption, - DefaultTags = resource.DefaultTags, + DefaultTags = resource.DefaultTags ?? new HashSet() }; } diff --git a/src/NzbDrone.Core/RootFolders/RootFolder.cs b/src/NzbDrone.Core/RootFolders/RootFolder.cs index e26704c82..138bdf070 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolder.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolder.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Core.RootFolders public int DefaultQualityProfileId { get; set; } public MonitorTypes DefaultMonitorOption { get; set; } public NewItemMonitorTypes DefaultNewItemMonitorOption { get; set; } - public HashSet DefaultTags { get; set; } + public HashSet DefaultTags { get; set; } = new (); public bool Accessible { get; set; } public long? FreeSpace { get; set; }