fix 优化可能为null情况

This commit is contained in:
2024-03-25 13:56:51 +08:00
parent 19e96788fa
commit 2daa1b918d

View File

@@ -214,7 +214,10 @@ public class GainfoService : IGainfoService
if (info != null)
{
var tenantResult = await _tenantApi.GetTenantByCodeAsync(info.Factory);
info.Factory = tenantResult.Data.Name;
if (tenantResult != null && tenantResult.Data != null)
{
info.Factory = tenantResult.Data.Name;
}
}
return info;