U4-8923 Adding new property to media breaks ability to save

If you add a new property to a member or media type and then try to update an
existing media item/member ContentRepository didn't have this problem because
it was already using the additional if statement that has now also been added to
MemberRepository and MediaRepository
This commit is contained in:
Sebastiaan Janssen
2016-09-01 15:15:47 +02:00
parent 71482f0fc9
commit a74feab9eb
2 changed files with 4 additions and 0 deletions

View File

@@ -413,6 +413,8 @@ namespace Umbraco.Core.Persistence.Repositories
{
foreach (var property in entity.Properties)
{
if (keyDictionary.ContainsKey(property.PropertyTypeId) == false) continue;
property.Id = keyDictionary[property.PropertyTypeId];
}
}

View File

@@ -365,6 +365,8 @@ namespace Umbraco.Core.Persistence.Repositories
{
foreach (var property in ((Member)entity).Properties)
{
if (keyDictionary.ContainsKey(property.PropertyTypeId) == false) continue;
property.Id = keyDictionary[property.PropertyTypeId];
}
}