mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 13:09:41 +02:00
added comments
This commit is contained in:
parent
0e7b5ae8cb
commit
914fbdc04b
1 changed files with 5 additions and 3 deletions
|
@ -837,17 +837,19 @@ class DomainAddUserView(DomainFormBaseView):
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Check to see if an invite has already been sent (NOTE: we do not want to create an invite just yet.)
|
# Check to see if an invite has already been sent
|
||||||
try:
|
try:
|
||||||
add_success=False
|
|
||||||
invite = DomainInvitation.objects.get(email=email, domain=self.object)
|
invite = DomainInvitation.objects.get(email=email, domain=self.object)
|
||||||
# that invitation already existed
|
# check if the invite has already been accepted
|
||||||
if invite.status == DomainInvitation.DomainInvitationStatus.RETRIEVED:
|
if invite.status == DomainInvitation.DomainInvitationStatus.RETRIEVED:
|
||||||
|
add_success=False
|
||||||
messages.warning(
|
messages.warning(
|
||||||
self.request,
|
self.request,
|
||||||
f"{email} is already a manager for this domain.",
|
f"{email} is already a manager for this domain.",
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
add_success=False
|
||||||
|
#else if it has been sent but not accepted
|
||||||
messages.warning(
|
messages.warning(
|
||||||
self.request,
|
self.request,
|
||||||
f"{email} has already been invited to this domain"
|
f"{email} has already been invited to this domain"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue