Resolved check for removed properties

This commit is contained in:
Andy Neil
2018-11-08 15:45:59 +00:00
committed by Sebastiaan Janssen
parent e3e3e06458
commit e25e509d84

View File

@@ -328,7 +328,7 @@ AND umbracoNode.id <> @id",
// We check if the entity's own PropertyTypes has been modified and then also check
// any of the property groups PropertyTypes has been modified.
// This specifically tells us if any property type collections have changed.
if (entity.IsPropertyDirty("PropertyTypes") || entity.PropertyGroups.Any(x => x.IsPropertyDirty("PropertyTypes")))
if (entity.IsPropertyDirty("PropertyTypes") || entity.PropertyTypes.Any(pt => pt.IsDirty()))
{
var dbPropertyTypes = Database.Fetch<PropertyTypeDto>("WHERE contentTypeId = @Id", new { entity.Id });
var dbPropertyTypeAlias = dbPropertyTypes.Select(x => x.Id);