修改项目site 添加问题
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-06-07 13:55:01 +08:00
parent cc088900b6
commit cac0652120
2 changed files with 4 additions and 8 deletions
@@ -1634,7 +1634,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var type = GetEntityAuditOpt(item);
var entity = item.Entity as TrialSite;
if (entity.Site == null)
if (entity.Site == null && entity.SiteId!=null)
{
entity.Site = await _dbContext.Site.Where(x => x.Id == entity.SiteId).FirstOrDefaultAsync();
}
@@ -1650,9 +1650,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
SiteCode = entity.TrialSiteCode,
//Site 没记录稽查 必须查询存
SiteName = entity.Site.SiteName,
City = entity.Site.City,
Country = entity.Site.Country,
SiteName = entity.TrialSiteName
});
}