From de1968e5ba0000bfa5ee73022d28fbd703aeee3d Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 26 Apr 2021 19:07:16 +0100 Subject: [PATCH] Fixed: Don't ignore default Boolean in db serialization (cherry picked from commit 16b381720225b159d47a15e4beb50f8835940cda) --- .../Datastore/Converters/EmbeddedDocumentConverter.cs | 2 +- src/NzbDrone.Core/ThingiProvider/ProviderRepository.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs b/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs index 409e22e7f..85bd8f5f9 100644 --- a/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs @@ -14,7 +14,7 @@ namespace NzbDrone.Core.Datastore.Converters var serializerSettings = new JsonSerializerOptions { AllowTrailingCommas = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, PropertyNameCaseInsensitive = true, DictionaryKeyPolicy = JsonNamingPolicy.CamelCase, PropertyNamingPolicy = JsonNamingPolicy.CamelCase, diff --git a/src/NzbDrone.Core/ThingiProvider/ProviderRepository.cs b/src/NzbDrone.Core/ThingiProvider/ProviderRepository.cs index d41c31643..79defc9f1 100644 --- a/src/NzbDrone.Core/ThingiProvider/ProviderRepository.cs +++ b/src/NzbDrone.Core/ThingiProvider/ProviderRepository.cs @@ -22,7 +22,7 @@ namespace NzbDrone.Core.ThingiProvider var serializerSettings = new JsonSerializerOptions { AllowTrailingCommas = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, PropertyNameCaseInsensitive = true, DictionaryKeyPolicy = JsonNamingPolicy.CamelCase, PropertyNamingPolicy = JsonNamingPolicy.CamelCase,