Make HistoryCleanup register as dirty in ContentType

This commit is contained in:
nikolajlauridsen
2022-03-02 10:15:50 +01:00
parent 49e0e6c1c9
commit 1cdc6f0fd2

View File

@@ -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));
}
/// <summary>
/// Determines if AllowedTemplates contains templateId
@@ -162,5 +168,8 @@ namespace Umbraco.Cms.Core.Models
/// <inheritdoc />
IContentType IContentType.DeepCloneWithResetIdentities(string newAlias) =>
(IContentType)DeepCloneWithResetIdentities(newAlias);
/// <inheritdoc/>
public override bool IsDirty() => base.IsDirty() || HistoryCleanup.IsDirty();
}
}