udpates health check and service methods to be flexible for data integrity checks, fixes tests

This commit is contained in:
Shannon
2020-04-07 16:42:21 +10:00
parent ad698f9c19
commit 18d9ad3c73
12 changed files with 163 additions and 172 deletions

View File

@@ -66,7 +66,10 @@ namespace Umbraco.Core
// When this occurs, only Path + Level + UpdateDate are being changed. In this case we can bypass a lot of the below
// operations which will make this whole operation go much faster. When moving we don't need to create
// new versions, etc... because we cannot roll this operation back anyways.
var isMoving = entity.GetDirtyProperties().All(x => x == nameof(entity.Path) || x == nameof(entity.Level) || x == nameof(entity.UpdateDate));
var isMoving = entity.IsPropertyDirty(nameof(entity.Path))
&& entity.IsPropertyDirty(nameof(entity.Level))
&& entity.IsPropertyDirty(nameof(entity.UpdateDate));
return isMoving;
}