dev #61

Merged
Thibaut merged 4 commits from dev into master 2025-11-14 12:45:54 +00:00
Showing only changes of commit d02fd63834 - Show all commits

View File

@ -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");
} }
} }