From 9bac8c22b0c1ebde1afe8b632bb00a35904fcb61 Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 25 May 2021 17:50:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(backend):=E5=90=8E=E7=AB=AFfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/service/dataset/DataSetGroupService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java index 9de794919f..4b84680302 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java @@ -139,10 +139,12 @@ public class DataSetGroupService { } public void getParent(List list, DatasetGroup datasetGroup) { - if (StringUtils.isNotEmpty(datasetGroup.getPid())) { - DatasetGroup d = datasetGroupMapper.selectByPrimaryKey(datasetGroup.getPid()); - list.add(d); - getParent(list, d); + if (ObjectUtils.isNotEmpty(datasetGroup)) { + if (StringUtils.isNotEmpty(datasetGroup.getPid())) { + DatasetGroup d = datasetGroupMapper.selectByPrimaryKey(datasetGroup.getPid()); + list.add(d); + getParent(list, d); + } } } }