mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-27 03:23:51 +02:00
Update domain.py
This commit is contained in:
parent
9e16b0b65c
commit
9f7f176472
1 changed files with 1 additions and 5 deletions
|
@ -649,12 +649,8 @@ class DomainAddUserView(DomainFormBaseView):
|
||||||
email: string- email to send to
|
email: string- email to send to
|
||||||
add_success: bool- default True indicates:
|
add_success: bool- default True indicates:
|
||||||
adding a success message to the view if the email sending succeeds"""
|
adding a success message to the view if the email sending succeeds"""
|
||||||
# created a new invitation in the database, so send an email
|
|
||||||
if requester is None:
|
|
||||||
# This edgecase would be unusual if encountered. We don't want to handle this here. Rather, we would
|
|
||||||
# want to fix this upstream where it is happening.
|
|
||||||
raise ValueError("Can't send email. The given DomainInformation object has no requestor or creator.")
|
|
||||||
|
|
||||||
|
# Check if the email requester has a valid email address
|
||||||
if requester.email is not None and requester.email.strip() != "":
|
if requester.email is not None and requester.email.strip() != "":
|
||||||
requester_email = requester.email
|
requester_email = requester.email
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue