mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 04:59:59 +02:00
formated changes
This commit is contained in:
parent
ef30e06b89
commit
68b8a6086b
1 changed files with 11 additions and 14 deletions
|
@ -842,18 +842,15 @@ class DomainAddUserView(DomainFormBaseView):
|
||||||
invite = DomainInvitation.objects.get(email=email, domain=self.object)
|
invite = DomainInvitation.objects.get(email=email, domain=self.object)
|
||||||
# check if the invite has already been accepted
|
# check if the invite has already been accepted
|
||||||
if invite.status == DomainInvitation.DomainInvitationStatus.RETRIEVED:
|
if invite.status == DomainInvitation.DomainInvitationStatus.RETRIEVED:
|
||||||
add_success=False
|
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
|
add_success = False
|
||||||
#else if it has been sent but not accepted
|
# else if it has been sent but not accepted
|
||||||
messages.warning(
|
messages.warning(self.request, f"{email} has already been invited to this domain")
|
||||||
self.request,
|
|
||||||
f"{email} has already been invited to this domain"
|
|
||||||
)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.error("An error occured")
|
logger.error("An error occured")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue