]> git.parisson.com Git - teleforma.git/commitdiff
update init script
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 4 Feb 2016 16:52:37 +0000 (17:52 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 4 Feb 2016 16:52:37 +0000 (17:52 +0100)
teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py

index d1f68d770845c80fae597607c999e5cebf995eb7..3d4cc9171e9a069d121f313a1c9106995cf84647 100644 (file)
@@ -51,10 +51,10 @@ class Command(BaseCommand):
 
         for user in users:
             profile, c = Profile.objects.get_or_create(user=user)
-            student = user.student.all()
-            professor = user.professor.all()
+            students = user.student.all()
+            professors = user.professor.all()
             quotas = user.quotas.all()
-            if student or professor or quotas:
+            if students or professors or quotas:
                 if profile and user.is_active:
                     if not profile.init_password and user.email:
                         self.init_password_email(user)
@@ -62,4 +62,4 @@ class Command(BaseCommand):
                         profile.save()
                         logger.logger.info('init : ' + user.username)
 
-        logger.logger.info('############## Done #################')
\ No newline at end of file
+        logger.logger.info('############## Done #################')