aboutsummaryrefslogtreecommitdiffstats
path: root/email_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'email_client.py')
-rw-r--r--email_client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/email_client.py b/email_client.py
index e06c901..8cad903 100644
--- a/email_client.py
+++ b/email_client.py
@@ -69,7 +69,7 @@ else:
def send_participation_email(poll_id: str, voter_name: str):
poll = db.get_poll(poll_id)
- if not poll or poll.author_email is None:
+ if not poll or poll.author_email is None or poll.author_email.strip() == "":
return
print(f"Sending participation email to {poll.author_email}")
@@ -88,7 +88,7 @@ def send_participation_email(poll_id: str, voter_name: str):
def send_poll_created_email(poll_id: str):
poll = db.get_poll(poll_id)
- if not poll or poll.author_email is None:
+ if not poll or poll.author_email is None or poll.author_email.strip() == "":
return
print(f"Sending poll created email to {poll.author_email}")