From 45e6d7ba3290d452a90974780ecac58c67b9988d Mon Sep 17 00:00:00 2001 From: yomguy Date: Fri, 13 Jul 2012 18:03:46 +0200 Subject: [PATCH] fix import again --- .../teleforma-reset-all-passwords-with-mail.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 cb1589e2..ea3498c2 100644 --- a/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py +++ b/teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py @@ -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 -- 2.39.5