dev #95
@ -479,7 +479,8 @@ public class MembreService {
|
|||||||
return clubRepository.findById(input.getClub())
|
return clubRepository.findById(input.getClub())
|
||||||
.call(__ -> repository.count("email LIKE ?1", input.getEmail())
|
.call(__ -> repository.count("email LIKE ?1", input.getEmail())
|
||||||
.invoke(Unchecked.consumer(c -> {
|
.invoke(Unchecked.consumer(c -> {
|
||||||
if (c > 0) throw new DBadRequestException("Email déjà utilisé");
|
if (c > 0 && input.getEmail() != null && !input.getEmail().isBlank())
|
||||||
|
throw new DBadRequestException("Email déjà utilisé");
|
||||||
})))
|
})))
|
||||||
.chain(clubModel -> {
|
.chain(clubModel -> {
|
||||||
MembreModel model = getMembreModel(input, clubModel);
|
MembreModel model = getMembreModel(input, clubModel);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user