From c738c11bddcb7f02ef33dd663c637c719aed07ac Mon Sep 17 00:00:00 2001 From: William Donnette Date: Wed, 18 Dec 2024 10:56:08 +0100 Subject: [PATCH] fix: :bug: remove the admin account from reminders --- .../batch/relance/ConstructionListeEtabTasklet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batch/src/main/java/fr/abes/licencesnationales/batch/relance/ConstructionListeEtabTasklet.java b/batch/src/main/java/fr/abes/licencesnationales/batch/relance/ConstructionListeEtabTasklet.java index 5c505730..ed1e5f6b 100644 --- a/batch/src/main/java/fr/abes/licencesnationales/batch/relance/ConstructionListeEtabTasklet.java +++ b/batch/src/main/java/fr/abes/licencesnationales/batch/relance/ConstructionListeEtabTasklet.java @@ -62,7 +62,7 @@ public ExitStatus afterStep(StepExecution stepExecution) { public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws Exception { try { List 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());