Merge pull request #5781 from dataease/pr@dev@fixdatasource

fix: 行列权限空指针异常
This commit is contained in:
taojinlong
2023-07-27 14:44:44 +08:00
committed by GitHub

View File

@@ -239,7 +239,7 @@ public class PermissionService {
request.setDatasetId(datasetId);
request.setAuthTargetType("dept");
List<Item> items = (List<Item>)columnPermissionService.authObjs(request);
if(items.stream().map(Item::getId).collect(Collectors.toList()).contains(deptId)){
if(CollectionUtils.isNotEmpty(items) && items.stream().map(Item::getId).collect(Collectors.toList()).contains(deptId)){
dataSetColumnPermissionsDTO.setAuthTargetIds(Collections.singletonList(deptId));
dataSetColumnPermissionsDTO.setAuthTargetType("dept");
List<DataSetColumnPermissionsDTO> deptColumnPermissionsDTOS = new ArrayList<>();