fix(aff_req): fix npe on licences
This commit is contained in:
parent
2411ebced7
commit
0ff2c399b3
@ -245,7 +245,7 @@ public class AffiliationService {
|
||||
keycloakService.setClubGroupMembre(m, club).map(__ -> m.getUserId()))
|
||||
.call(userId -> keycloakService.setAutoRoleMembre(userId, m.getRole(), m.getGrade_arbitrage())))
|
||||
.call(m -> Mutiny.fetch(m.getLicences())
|
||||
.call(l1 -> l1.stream().anyMatch(l -> l.getSaison() == saison) ?
|
||||
.call(l1 -> l1 != null && l1.stream().anyMatch(l -> l.getSaison() == saison) ?
|
||||
Uni.createFrom().nullItem() :
|
||||
Panache.withTransaction(() -> licenceRepository.persist(
|
||||
new LicenceModel(null, m, saison, null, true)))));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user