X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4b86e623b0ff7a5a53bdb29df06eab039ebe4e1e..6d42bc478e3d1bd90eb294464748c21e4de0fc63:/src/club/helpers.py?ds=inline diff --git a/src/club/helpers.py b/src/club/helpers.py index b7592fadd..b4ef0dd7d 100644 --- a/src/club/helpers.py +++ b/src/club/helpers.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 django.utils.timezone import now from .models import Schedule @@ -5,5 +8,5 @@ from .models import Schedule def get_active_schedule(user): if not user.is_authenticated: return None - return Schedule.objects.filter(membership__user=user, is_active=True).exclude(expires_at__lt=now()).first() + return Schedule.objects.filter(membership__user=user, expires_at__gt=now()).first()