dev #61
@ -236,17 +236,17 @@ public class MembreService {
|
|||||||
return mm;
|
return mm;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (model.getEmail() != null) {
|
if (model.getEmail() != null && !model.getEmail().isBlank()) {
|
||||||
if (model.getLicence() != null && !model.getLicence().equals(dataIn.getLicence())) {
|
if (model.getLicence() != null && !model.getLicence().equals(dataIn.getLicence())) {
|
||||||
LOGGER.info("Similar membres found: " + model);
|
LOGGER.info("Similar membres found: " + model);
|
||||||
throw new DBadRequestException("Email déja utiliser");
|
throw new DBadRequestException("Email '" + model.getEmail() + "' déja utiliser");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringSimilarity.similarity(model.getLname().toUpperCase(),
|
if (StringSimilarity.similarity(model.getLname().toUpperCase(),
|
||||||
dataIn.getNom().toUpperCase()) > 3 || StringSimilarity.similarity(
|
dataIn.getNom().toUpperCase()) > 3 || StringSimilarity.similarity(
|
||||||
model.getFname().toUpperCase(), dataIn.getPrenom().toUpperCase()) > 3) {
|
model.getFname().toUpperCase(), dataIn.getPrenom().toUpperCase()) > 3) {
|
||||||
LOGGER.info("Similar membres found: " + model);
|
LOGGER.info("Similar membres found: " + model);
|
||||||
throw new DBadRequestException("Email déja utiliser");
|
throw new DBadRequestException("Email '" + model.getEmail() + "' déja utiliser");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user