From 77d88fdf0cbda9bce4896ac15ffc32b8c286afcb Mon Sep 17 00:00:00 2001
From: Art Lukyanchyk <artiom.lukyanchyk@hs-hannover.de>
Date: Fri, 22 Sep 2017 16:06:47 +0200
Subject: [PATCH] Fix the error with nullable email (django.contrib.auth
 compat).

---
 ssoauth/auth_utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ssoauth/auth_utils.py b/ssoauth/auth_utils.py
index 2ed213e..0fbef01 100644
--- a/ssoauth/auth_utils.py
+++ b/ssoauth/auth_utils.py
@@ -92,7 +92,7 @@ def update_user_data(user, surname=None, forename=None, email=None):
     assert isinstance(user, get_user_model())
     user.first_name = forename or str()
     user.last_name = surname or str()
-    user.email = email or None
+    user.email = email or ""
     user.save()
 
 
-- 
GitLab