merge fixes
This commit is contained in:
@@ -517,11 +517,11 @@ namespace Umbraco.Core.Models
|
||||
}
|
||||
|
||||
//if properties exist then deal with event bindings
|
||||
if (clone._schedule != null)
|
||||
if (clonedContent._schedule != null)
|
||||
{
|
||||
clone._schedule.CollectionChanged -= ScheduleCollectionChanged; //clear this event handler if any
|
||||
clone._schedule = (ContentScheduleCollection)_schedule.DeepClone(); //manually deep clone
|
||||
clone._schedule.CollectionChanged += clone.ScheduleCollectionChanged; //re-assign correct event handler
|
||||
clonedContent._schedule.CollectionChanged -= ScheduleCollectionChanged; //clear this event handler if any
|
||||
clonedContent._schedule = (ContentScheduleCollection)_schedule.DeepClone(); //manually deep clone
|
||||
clonedContent._schedule.CollectionChanged += clonedContent.ScheduleCollectionChanged; //re-assign correct event handler
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -411,11 +411,10 @@ namespace Umbraco.Tests.Models
|
||||
content.Id = 10;
|
||||
content.CreateDate = DateTime.Now;
|
||||
content.CreatorId = 22;
|
||||
content.ExpireDate = DateTime.Now;
|
||||
content.ContentSchedule.Add(DateTime.Now, DateTime.Now.AddDays(1));
|
||||
content.Key = Guid.NewGuid();
|
||||
content.Level = 3;
|
||||
content.Path = "-1,4,10";
|
||||
content.ReleaseDate = DateTime.Now;
|
||||
content.SortOrder = 5;
|
||||
content.Template = new Template((string)"Test Template", (string)"testTemplate")
|
||||
{
|
||||
@@ -437,11 +436,10 @@ namespace Umbraco.Tests.Models
|
||||
Assert.IsTrue(content.WasPropertyDirty("Id"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("CreateDate"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("CreatorId"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("ExpireDate"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("Key"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("Level"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("Path"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("ReleaseDate"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("ContentSchedule"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("SortOrder"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("Template"));
|
||||
Assert.IsTrue(content.WasPropertyDirty("Trashed"));
|
||||
|
||||
Reference in New Issue
Block a user