X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/06a4fa420a6b220d7f6feac773bb9e6302b9b3dc..0b1d7187cd243b29566418c3b09fa8043ed53bee:/src/messaging/management/commands/messaging_send.py?ds=inline diff --git a/src/messaging/management/commands/messaging_send.py b/src/messaging/management/commands/messaging_send.py index b85957fdc..2fa817666 100644 --- a/src/messaging/management/commands/messaging_send.py +++ b/src/messaging/management/commands/messaging_send.py @@ -9,6 +9,6 @@ class Command(BaseCommand): parser.add_argument('--dry-run', action='store_true', help='Dry run') def handle(self, *args, **options): - for et in EmailTemplate.objects.filter(is_active=True): + for et in EmailTemplate.get_current().order_by('min_days_since'): et.run(verbose=True, dry_run=options['dry_run'])