fix: 行列权限空指针异常

This commit is contained in:
taojinlong 2023-07-27 14:43:25 +08:00
parent b0c37bc2a4
commit 838a91d6cb

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<>();