From: yomguy Date: Fri, 13 Jul 2012 16:03:46 +0000 (+0200) Subject: fix import again X-Git-Tag: 0.7-dev~4 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=45e6d7ba3290d452a90974780ecac58c67b9988d;p=teleforma.git fix import again --- 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