diff --git a/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MainProgramCompleteRule.java b/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MainProgramCompleteRule.java index 32239feb..bfbaecce 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MainProgramCompleteRule.java +++ b/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MainProgramCompleteRule.java @@ -32,7 +32,7 @@ public RuleData fire() { List nongReason = ruleProcessorData.getNonGradReasons(); for (Map.Entry entry : mapOptional.entrySet()) { OptionalProgramRuleProcessor obj = entry.getValue(); - if(obj != null && obj.isHasOptionalProgram() && obj.isOptionalProgramGraduated()) { + if(obj != null && obj.isHasOptionalProgram()) { processMainProgramCompleteRules(nongReason,obj); } } @@ -79,7 +79,7 @@ private void processMainProgramCompleteRules(List nonGradReason nonGReasons = new ArrayList<>(); nonGReasons.addAll(requirementsNotMet); - obj.setNonGradReasonsOptionalProgram(nonGReasons); + obj.setNonGradReasonsOptionalProgram(nonGReasons.stream().distinct().toList()); } } }