diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs b/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs index df23b1fc72..d3077b0fd3 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs @@ -5,9 +5,6 @@ using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Validation; -using Umbraco.Web.WebApi; namespace Umbraco.Web.Models.ContentEditing { @@ -47,7 +44,7 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "state")] [JsonConverter(typeof(StringEnumConverter))] - public ContentSavedState State { get; set; } + public ContentSavedState? State { get; set; } = null; protected bool Equals(ContentItemBasic other) { diff --git a/src/Umbraco.Web/Models/Mapping/ContentMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/ContentMapperProfile.cs index 6ae36a1f19..445b88216c 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentMapperProfile.cs @@ -92,14 +92,15 @@ namespace Umbraco.Web.Models.Mapping } } - internal class CultureStateResolver : IValueResolver, ContentSavedState> + internal class CultureStateResolver : IValueResolver, ContentSavedState?> { //WB: Note this is same logic as ContentSavedStateResolver.cs //But this is for ContentItemBasic instead of ContentVariantDisplay - public ContentSavedState Resolve(IContent source, ContentItemBasic destination, ContentSavedState destMember, ResolutionContext context) + public ContentSavedState? Resolve(IContent source, ContentItemBasic destination, ContentSavedState? destMember, ResolutionContext context) { PublishedState publishedState; bool isEdited; + if (source.ContentType.VariesByCulture()) {