From: Guillaume Pellerin Date: Tue, 10 Jul 2012 15:05:05 +0000 (+0200) Subject: fix no mail X-Git-Tag: 0.7-dev~17 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3f7cd983acb4616389c84b9309f17b5ecf773a7d;p=teleforma.git fix no mail --- diff --git a/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py b/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py index 70da1ca1..897a4502 100644 --- a/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py +++ b/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py @@ -37,7 +37,7 @@ class Command(BaseCommand): profile, c = Profile.objects.get_or_create(user=user) student = user.student.all() if profile and student and user.is_active: - if not profile.init_password : + if not profile.init_password and user.email: self.init_password_email(user) profile.init_password = True profile.save()