Making a few more corrections to allow setting the Key-guid value for ContentType, MediaType and Media.

This commit is contained in:
Morten Christensen
2012-11-14 07:24:07 -01:00
parent 46ce70f4a7
commit be1e98fda2
3 changed files with 9 additions and 3 deletions

View File

@@ -133,7 +133,9 @@ namespace Umbraco.Core.Models
internal override void AddingEntity()
{
base.AddingEntity();
Key = Guid.NewGuid();
if(Key == Guid.Empty)
Key = Guid.NewGuid();
}
/// <summary>

View File

@@ -104,7 +104,9 @@ namespace Umbraco.Core.Models
internal override void AddingEntity()
{
base.AddingEntity();
Key = Guid.NewGuid();
if (Key == Guid.Empty)
Key = Guid.NewGuid();
}
/// <summary>

View File

@@ -21,7 +21,9 @@ namespace Umbraco.Core.Models
internal override void AddingEntity()
{
base.AddingEntity();
Key = Guid.NewGuid();
if (Key == Guid.Empty)
Key = Guid.NewGuid();
}
/// <summary>