From f2fb0cbee2d0c7c2593ff27a5f2362e023a7d8a7 Mon Sep 17 00:00:00 2001 From: CHRISTOPHERKADOGO Date: Fri, 12 Jul 2024 10:01:49 +0300 Subject: [PATCH] removed the print statement --- app/controllers/users.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/users.py b/app/controllers/users.py index d4b339f8..db22751c 100644 --- a/app/controllers/users.py +++ b/app/controllers/users.py @@ -44,10 +44,12 @@ def post(self): validated_user_data, errors = user_schema.load(user_data) + if errors: + return dict(status="fail", message=errors), 400 + email = validated_user_data.get('email', None) - print(email) + if not is_valid_email(email): - print(email) return dict(status='fail', message=f'Invalid email address'), 400 @@ -64,8 +66,7 @@ def post(self): template = "user/verify.html" subject = "Please confirm your email" - if errors: - return dict(status="fail", message=errors), 400 + # get the customer role user_role = Role.find_first(name='customer')