From: Guillaume Pellerin Date: Fri, 20 Dec 2013 16:27:52 +0000 (+0100) Subject: no reminder when user seminar is validated X-Git-Tag: 2.8.1-pro~398 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=120e99c7d874b3b963110194a8b328097410e390;p=teleforma.git no reminder when user seminar is validated --- diff --git a/teleforma/management/commands/teleforma-message-all-seminar-users.py b/teleforma/management/commands/teleforma-message-all-seminar-users.py index 21e14fa5..5a285a17 100644 --- a/teleforma/management/commands/teleforma-message-all-seminar-users.py +++ b/teleforma/management/commands/teleforma-message-all-seminar-users.py @@ -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: