From f2a7f0addb23f989ad75041bb41f0d539911ff8d Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Sat, 7 Dec 2013 00:21:56 +0100 Subject: [PATCH] rm professors --- .../commands/teleforma-message-all-seminar-users.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: -- 2.39.5