From 1cdc6f0fd2d13cf57650a0dcbb7ec081d2d85156 Mon Sep 17 00:00:00 2001 From: nikolajlauridsen Date: Wed, 2 Mar 2022 10:15:50 +0100 Subject: [PATCH] Make HistoryCleanup register as dirty in ContentType --- src/Umbraco.Core/Models/ContentType.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/ContentType.cs b/src/Umbraco.Core/Models/ContentType.cs index 6ff94f57f3..a252aa4723 100644 --- a/src/Umbraco.Core/Models/ContentType.cs +++ b/src/Umbraco.Core/Models/ContentType.cs @@ -96,7 +96,13 @@ namespace Umbraco.Cms.Core.Models } } - public HistoryCleanup HistoryCleanup { get; set; } + private HistoryCleanup _historyCleanup; + + public HistoryCleanup HistoryCleanup + { + get => _historyCleanup; + set => SetPropertyValueAndDetectChanges(value, ref _historyCleanup, nameof(HistoryCleanup)); + } /// /// Determines if AllowedTemplates contains templateId @@ -162,5 +168,8 @@ namespace Umbraco.Cms.Core.Models /// IContentType IContentType.DeepCloneWithResetIdentities(string newAlias) => (IContentType)DeepCloneWithResetIdentities(newAlias); + + /// + public override bool IsDirty() => base.IsDirty() || HistoryCleanup.IsDirty(); } }