Skip to content

Commit

Permalink
Merge pull request #158 from abes-esr/test
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 0b80017 + 5a8a8cb commit 89eced7
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 89eced7

Please # to comment.