fix: 行列权限空指针异常

This commit is contained in:
taojinlong 2023-07-28 14:27:13 +08:00
parent 838a91d6cb
commit bb849a2a55

View File

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