From 9f7f1764729a8c88aa158c16923a821a886fa21b Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:18:01 -0700 Subject: [PATCH] Update domain.py --- src/registrar/views/domain.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py index 3bd9e15a8..52e4e27d8 100644 --- a/src/registrar/views/domain.py +++ b/src/registrar/views/domain.py @@ -649,12 +649,8 @@ class DomainAddUserView(DomainFormBaseView): email: string- email to send to add_success: bool- default True indicates: 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() != "": requester_email = requester.email else: