fix(aff): lazy loading on licence in validation aff req
This commit is contained in:
parent
7d35472ea5
commit
972d599642
@ -240,10 +240,11 @@ public class AffiliationService {
|
||||
.call(m -> ((m.getUserId() == null) ? keycloakService.initCompte(m.getId()) :
|
||||
keycloakService.setClubGroupMembre(m, club).map(__ -> m.getUserId()))
|
||||
.call(userId -> keycloakService.setAutoRoleMembre(userId, m.getRole(), m.getGrade_arbitrage())))
|
||||
.call(m -> m.getLicences().stream().anyMatch(l -> l.getSaison() == saison) ?
|
||||
.call(m -> Mutiny.fetch(m.getLicences())
|
||||
.call(l1 -> l1.stream().anyMatch(l -> l.getSaison() == saison) ?
|
||||
Uni.createFrom().nullItem() :
|
||||
Panache.withTransaction(() -> licenceRepository.persist(
|
||||
new LicenceModel(null, m, saison, null, true))));
|
||||
new LicenceModel(null, m, saison, null, true)))));
|
||||
}
|
||||
|
||||
public Uni<?> accept(AffiliationRequestSaveForm form) {
|
||||
@ -303,7 +304,8 @@ public class AffiliationService {
|
||||
Cordialement,
|
||||
L'équipe de la FFSAF
|
||||
""", club.getName(), club.getNo_affiliation())
|
||||
).setFrom("FFSAF <no-reply@ffsaf.fr>").setReplyTo("contact@ffsaf.fr").addTo(form.getM2_email(), form.getM3_email())
|
||||
).setFrom("FFSAF <no-reply@ffsaf.fr>").setReplyTo("contact@ffsaf.fr")
|
||||
.addTo(form.getM2_email(), form.getM3_email())
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user