Request validation fix.
[wolnelektury.git] / src / club / management / commands / prolong.py
index 3c8b36c..34ebe63 100644 (file)
@@ -9,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)