]> git.parisson.com Git - teleforma.git/commitdiff
rm professors
authorGuillaume Pellerin <yomguy@parisson.com>
Fri, 6 Dec 2013 23:21:56 +0000 (00:21 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Fri, 6 Dec 2013 23:21:56 +0000 (00:21 +0100)
teleforma/management/commands/teleforma-message-all-seminar-users.py

index 3c52a011ca8f35ae512e3be7ca5f8db4da5b4dfa..e373baddcf9366dfa5d58ff948aa028b8489bc9a 100644 (file)
@@ -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: