refactor(项目管理): 优化环境组返回值展示

This commit is contained in:
wxg0103 2024-02-28 18:44:02 +08:00 committed by Craftsman
parent 7692b0d9b1
commit 6f26800fd8
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import io.metersphere.system.uid.IDGenerator;
import io.metersphere.system.utils.ServiceUtils;
import jakarta.annotation.Resource;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
@ -195,7 +196,7 @@ public class EnvironmentGroupService {
EnvironmentBlob environmentBlob = envBlobMap.get(e.getEnvironmentId());
if (environmentBlob != null) {
EnvironmentConfig environmentConfig = JSON.parseObject(new String(environmentBlob.getConfig()), EnvironmentConfig.class);
dto.setDomain(environmentConfig.getHttpConfig());
dto.setDomain(ObjectUtils.isNotEmpty(environmentConfig) ? environmentConfig.getHttpConfig() : new ArrayList<>());
}
result.add(dto);
});