diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java index e97914d..71085a1 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -85,9 +85,15 @@ public class ApplyCompletionAction implements Action { List negativeBlames = verifyData.getBlames().stream().map(item -> { NegativeBlame negativeBlame = new NegativeBlame(); BeanUtil.copyProperties(item, negativeBlame); - VerifyData.BlameLeader blameLeader = verifyData.getBlameLeaders().stream() - .filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())).findFirst().get(); - BeanUtil.copyProperties(blameLeader, negativeBlame); + if(verifyData != null && verifyData.getBlameLeaders() != null) { + List blameLeaders = verifyData.getBlameLeaders().stream() + .filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())) + .toList(); + if(!blameLeaders.isEmpty()) { + BeanUtil.copyProperties(blameLeaders.getFirst(), negativeBlame); + } + } + negativeBlame .setBlameId(IdUtil.fastSimpleUUID()) .setNegativeId(negativeId)