Skip to content

Commit

Permalink
Merge pull request #156 from abes-esr/fix-mail-relance-admin
Browse files Browse the repository at this point in the history
fix: 🐛 remove the admin account from reminders
  • Loading branch information
julg authored Dec 18, 2024
2 parents 5139cbf + c738c11 commit 52a46c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public ExitStatus afterStep(StepExecution stepExecution) {
public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws Exception {
try {
List<EtablissementEntity> etab = service.findAll();
this.etabSansIp = etab.stream().filter(e -> e.getIps().size() == 0).collect(Collectors.toList());
this.etabSansIp = etab.stream().filter(e -> e.getIps().size() == 0).filter(e -> !e.getContact().getRole().equals("admin")).collect(Collectors.toList());
this.etabAvecAuMoinsUneIpAttestation = etab.stream().filter(e ->
e.getIps().stream().anyMatch(i -> i.getStatut().getIdStatut() == Constant.STATUT_IP_ATTESTATION)
).collect(Collectors.toList());
Expand Down

0 comments on commit 52a46c2

Please sign in to comment.