Merge pull request #2177 from umbraco/temp-U4-10384
U4-10384 Error when changing content type on media item
This commit is contained in:
@@ -93,6 +93,10 @@ namespace Umbraco.Core.Models
|
||||
//NOTE: Consider checking type before value is set: item.PropertyType.DataTypeId == property.PropertyType.DataTypeId
|
||||
//Transfer the existing value to the new property
|
||||
var property = this[key];
|
||||
if (item.Id == 0 && property.Id != 0)
|
||||
{
|
||||
item.Id = property.Id;
|
||||
}
|
||||
if (item.Value == null && property.Value != null)
|
||||
{
|
||||
item.Value = property.Value;
|
||||
|
||||
Reference in New Issue
Block a user