Skip to content

Commit

Permalink
feat(be): eliminata unique email
Browse files Browse the repository at this point in the history
  • Loading branch information
carloalbertosimoncini committed Jul 22, 2022
1 parent 790f6a9 commit d362c3e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ public UtenteEntity getUtenteEagerByCodiceFiscale(String codiceFiscale) {
@LogExecutionTime
@LogMethod
public UtenteEntity creaNuovoUtente(UtenteEntity utente, String codiceRuolo) {
if(isEmailDuplicata(utente.getEmail(), utente.getCodiceFiscale())) {
throw new UtenteException("ERRORE: non possono esistere a sistema due email per due utenti diversi");
}
// if(isEmailDuplicata(utente.getEmail(), utente.getCodiceFiscale())) {
// throw new UtenteException("ERRORE: non possono esistere a sistema due email per due utenti diversi");
// }
Optional<UtenteEntity> oldUtente = this.utenteRepository.findByCodiceFiscale(utente.getCodiceFiscale());
if(oldUtente.isPresent()) {
utente.setId(oldUtente.get().getId());
Expand Down

0 comments on commit d362c3e

Please sign in to comment.