X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a7e41fefbf46ad5bfa2eb97dbd1cc11d3a28a354..788c99a388fd34de4c159d6a3cefed84291b95f5:/src/messaging/management/commands/messaging_send.py?ds=sidebyside diff --git a/src/messaging/management/commands/messaging_send.py b/src/messaging/management/commands/messaging_send.py index 6fb4a696c..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.all(): + for et in EmailTemplate.get_current().order_by('min_days_since'): et.run(verbose=True, dry_run=options['dry_run'])