From 3f7cd983acb4616389c84b9309f17b5ecf773a7d Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 10 Jul 2012 17:05:05 +0200 Subject: [PATCH] fix no mail --- .../commands/teleforma-reset-all-passwords-with-mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.39.5