Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Agnès Haasser <1035145+tut-tuuut@users.noreply.github.com>
  • Loading branch information
christophehenry and tut-tuuut authored Mar 15, 2022
1 parent 4540ad9 commit 81ab795
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions aidants_connect_habilitation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,15 @@ class Meta:
verbose_name = "aidant à habiliter"
verbose_name_plural = "aidants à habiliter"
unique_together = (("email", "organisation"),)
error_messages = {
NON_FIELD_ERRORS: {
"unique_together": (
"Il y a déjà un aidant avec la même adresse e-mail dans "
"cette organisation. Chaque aidant doit avoir son propre "
"e-mail nominatif."
),
}
}


class RequestMessage(models.Model):
Expand Down

0 comments on commit 81ab795

Please sign in to comment.