X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0ffaeae32918d959e94e2d94e0a020458a409a3a..1227b1201c537ea17e310f0faab4ead7cf0d25af:/src/club/management/commands/prolong.py diff --git a/src/club/management/commands/prolong.py b/src/club/management/commands/prolong.py index 9bc5e68cb..34ebe63ad 100644 --- a/src/club/management/commands/prolong.py +++ b/src/club/management/commands/prolong.py @@ -1,3 +1,6 @@ +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from datetime import timedelta from django.core.management.base import BaseCommand, CommandError from django.utils.timezone import now @@ -6,7 +9,7 @@ from club.models import Schedule class Command(BaseCommand): def handle(self, *args, **options): - for s in Schedule.objects.filter(is_cancelled=False, expires_at__lt=now() + timedelta(1)): + for s in Schedule.objects.exclude(monthly=False, yearly=False).filter(is_cancelled=False, expires_at__lt=now() + timedelta(1)): print(s, s.email, s.expires_at) s.pay(None)