From 30bd5273b632e9600a2f8a525277b952877ad049 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 4 Feb 2016 17:52:37 +0100 Subject: [PATCH] update init script --- .../commands/teleforma-reset-all-passwords-with-mail.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 #################') -- 2.39.5