]> git.parisson.com Git - teleforma.git/commitdiff
fix no mail
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 10 Jul 2012 15:05:05 +0000 (17:05 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 10 Jul 2012 15:05:05 +0000 (17:05 +0200)
teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py

index 70da1ca18d65aadebfa654ad83b5dcbcc0f42bb5..897a45027ccff4fd4484433b46b7d48e9da6adf5 100644 (file)
@@ -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()