]> git.parisson.com Git - teleforma.git/commitdiff
no reminder when user seminar is validated
authorGuillaume Pellerin <yomguy@parisson.com>
Fri, 20 Dec 2013 16:27:52 +0000 (17:27 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Fri, 20 Dec 2013 16:27:52 +0000 (17:27 +0100)
teleforma/management/commands/teleforma-message-all-seminar-users.py

index 21e14fa53b22e7f9432f163dad3ad4b55f70f053..5a285a1752f52251ca0daca8f441c68d8d4c69f3 100644 (file)
@@ -15,6 +15,7 @@ import logging
 import datetime
 from postman.models import *
 from postman.utils import email_visitor, notify_user
+from teleforma.context_processors import seminar_validated
 
 
 class Command(BaseCommand):
@@ -46,7 +47,7 @@ class Command(BaseCommand):
                 for seminar in all_seminars:
                     if seminar.expiry_date:
                         delta = seminar.expiry_date - today
-                        if delta.days < days:
+                        if delta.days < days and not seminar_validated(user, seminar):
                             seminars.append(seminar)
 
                 if seminars: