mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 13:01:44 +08:00
fix: 【数据集】api数据源和自定义sql关联后的数据集不显示,提示数据源已被删除
This commit is contained in:
@@ -293,7 +293,11 @@ public class DatasetGroupManage {
|
||||
private List<DatasourceDTO> getDatasource(Long datasetId) {
|
||||
List<CoreDatasetTable> coreDatasetTables = coreDatasetTableRepository.findByDatasetGroupId(datasetId);
|
||||
List<Long> ids = new ArrayList<>();
|
||||
coreDatasetTables.forEach(ele -> ids.add(ele.getDatasourceId()));
|
||||
coreDatasetTables.forEach(ele -> {
|
||||
if (!ids.contains(ele.getDatasourceId())) {
|
||||
ids.add(ele.getDatasourceId());
|
||||
}
|
||||
});
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
DEException.throwException(Translator.get("i18n_dataset_create_error"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user