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 committed Mar 15, 2022
1 parent 4540ad9 commit 45f2743
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion aidants_connect_habilitation/forms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import List, Tuple

from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.exceptions import NON_FIELD_ERRORS, ValidationError
from django.forms import (
BaseModelFormSet,
BooleanField,
Expand Down Expand Up @@ -206,6 +206,15 @@ class AidantRequestForm(PatchedErrorListForm):
class Meta:
model = AidantRequest
exclude = ["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 BaseAidantRequestFormSet(BaseModelFormSet):
Expand Down

0 comments on commit 45f2743

Please sign in to comment.