From: Guillaume Pellerin Date: Thu, 4 Feb 2016 16:52:37 +0000 (+0100) Subject: update init script X-Git-Tag: 1.1~75 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=30bd5273b632e9600a2f8a525277b952877ad049;p=teleforma.git update init script --- 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 d1f68d77..3d4cc917 100644 --- a/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py +++ b/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py @@ -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 #################')