From: Guillaume Pellerin Date: Fri, 6 Dec 2013 23:21:56 +0000 (+0100) Subject: rm professors X-Git-Tag: 2.8.1-pro~474^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f2a7f0addb23f989ad75041bb41f0d539911ff8d;p=teleforma.git rm professors --- diff --git a/teleforma/management/commands/teleforma-message-all-seminar-users.py b/teleforma/management/commands/teleforma-message-all-seminar-users.py index 3c52a011..e373badd 100644 --- a/teleforma/management/commands/teleforma-message-all-seminar-users.py +++ b/teleforma/management/commands/teleforma-message-all-seminar-users.py @@ -32,9 +32,10 @@ class Command(BaseCommand): today = datetime.datetime.now() for user in users: - profile, c = Profile.objects.get_or_create(user=user) auditor = user.auditor.all() - if auditor and profile and user.is_active and user.email: + professor = user.professor.all() + + if auditor and not professor and user.is_active and user.email: auditor = auditor[0] seminars = auditor.seminars.all() for seminar in seminars: