X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/97c8c6d7c7961976172bece182832d01c9c0fc4b..972f33fb2d98a9ff59c931ac6a8a82def7cea6fe:/src/club/management/commands/prolong.py?ds=inline diff --git a/src/club/management/commands/prolong.py b/src/club/management/commands/prolong.py index 34ebe63ad..2705990ee 100644 --- a/src/club/management/commands/prolong.py +++ b/src/club/management/commands/prolong.py @@ -2,6 +2,7 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from datetime import timedelta +import traceback from django.core.management.base import BaseCommand, CommandError from django.utils.timezone import now from club.models import Schedule @@ -11,5 +12,9 @@ class Command(BaseCommand): def handle(self, *args, **options): 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) + try: + s.pay(None) + except: + traceback.print_exc() +