Make sure entity media path is mapped for DTO types of GenericContentEntityDto
(cherry picked from commit fbe963a542)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
05354b2ce9
commit
2e40b11cd1
@@ -654,10 +654,14 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
var entity = new MediaEntitySlim();
|
||||
BuildContentEntity(entity, dto);
|
||||
|
||||
if (dto is MediaEntityDto contentDto)
|
||||
// fill in the media info
|
||||
if (dto is MediaEntityDto mediaEntityDto)
|
||||
{
|
||||
// fill in the media info
|
||||
entity.MediaPath = contentDto.MediaPath;
|
||||
entity.MediaPath = mediaEntityDto.MediaPath;
|
||||
}
|
||||
else if (dto is GenericContentEntityDto genericContentEntityDto)
|
||||
{
|
||||
entity.MediaPath = genericContentEntityDto.MediaPath;
|
||||
}
|
||||
|
||||
return entity;
|
||||
|
||||
Reference in New Issue
Block a user