]> git.parisson.com Git - teleforma.git/commitdiff
fix import again
authoryomguy <yomguy@parisson.com>
Fri, 13 Jul 2012 16:03:46 +0000 (18:03 +0200)
committeryomguy <yomguy@parisson.com>
Fri, 13 Jul 2012 16:03:46 +0000 (18:03 +0200)
teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py

index cb1589e22ff9d22d1ae48d4c261aee81027c9c5b..ea3498c2d6c2e1ec432d550b1b2f29a38a92fe60 100644 (file)
@@ -37,10 +37,11 @@ class Command(BaseCommand):
             profile, c = Profile.objects.get_or_create(user=user)
             student = user.student.all()
             professor = user.professor.all()
-            if profile and ( student or professor ) and user.is_active:
-                if not profile.init_password and user.email:
-                    self.init_password_email(user)
-                    profile.init_password = True
-                    profile.save()
-                    print user.username
+            if student or professor:
+                if profile and user.is_active:
+                    if not profile.init_password and user.email:
+                        self.init_password_email(user)
+                        profile.init_password = True
+                        profile.save()
+                        print user.username