From 02e7065b21528cb4d4e1562eafc30cc9018ca153 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 29 Jan 2020 01:03:59 -0800 Subject: [PATCH] Only validate email if it was provided --- amanuensis/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amanuensis/user.py b/amanuensis/user.py index f8dcbd3..70adc43 100644 --- a/amanuensis/user.py +++ b/amanuensis/user.py @@ -96,7 +96,7 @@ def create_user(username, displayname, email): # Validate arguments if not valid_username(username): raise ValueError("Invalid username: '{}'".format(username)) - if not valid_email(email): + if email and not valid_email(email): raise ValueError("Invalid email: '{}'".format(email)) # Create the user directory and initialize it with a blank user