create temporary user with an invalid & random email address

(authentic doesn't allow None to be used anymore)
This commit is contained in:
Frédéric Péters 2020-10-20 19:06:05 +02:00
parent 2b8835d47a
commit 33fdf1a003
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import random
from django.core import signing
from django.urls import reverse
from django.db import transaction
@ -59,7 +61,7 @@ class LoginView(mellon.views.LoginView):
user.is_active = False
user.save()
data = {}
data['email'] = None
data['email'] = 'adresse@email.invalid#%s' % random.randint(0, 10000000)
data['confirm_data'] = True
data['valid_email'] = False
data['skip_email_check'] = True