From 683e95de2d0d551b31b9e2ef51c8193b4cbc954f Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 3 Nov 2017 12:22:54 +0300 Subject: [PATCH] access update --- access/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/access/models.py b/access/models.py index 789cd76..a7135b1 100755 --- a/access/models.py +++ b/access/models.py @@ -104,7 +104,7 @@ class CustomUserManager(BaseUserManager): for group in role_list: user.groups.add(Group.objects.get(name=group)) - if is_send: + if is_send and password: invite = Invite.objects.create(owner=user, hash=''.join(random.choice(string.ascii_letters) for x in range(15))) body = { @@ -113,7 +113,7 @@ class CustomUserManager(BaseUserManager): Вы были успешны зарегистрированны на портале go.skillbox.ru ваш пароль %s для подтверждения регистрации перейдите по ссылке - https://go.skillbox.ru/api/v1/users/registration/?hash=%s''' %(user.password, invite.hash), + https://go.skillbox.ru/api/v1/users/registration/?hash=%s''' %(password, invite.hash), "from_email": 'robo@skillbox.ru', "recipient_list": [user.email], }