forked from ddrilling/AsbCloudServer
fixed nullReference in mapping filePropertiesDto
This commit is contained in:
parent
fbff8e986a
commit
6db671f955
@ -106,10 +106,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
foreach (var item in entities)
|
||||
{
|
||||
var filePropertiesDto = item.Adapt<FileInfoDto>();
|
||||
filePropertiesDto.AuthorName = item.Author.Name;
|
||||
filePropertiesDto.CompanyId = item.Author.IdCompany != null
|
||||
? item.Author.Company.Id
|
||||
: 0;
|
||||
filePropertiesDto.AuthorName = item.Author?.Name;
|
||||
filePropertiesDto.CompanyId = item.Author?.IdCompany ?? 0;
|
||||
result.Items.Add(filePropertiesDto);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user