fnp
/
wolnelektury.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b7592faddfec7e695cd022ec1321a892ff23137c
[wolnelektury.git]
/
src
/
club
/
helpers.py
1
from django.utils.timezone import now
2
from .models import Schedule
3
4
5
def get_active_schedule(user):
6
if not user.is_authenticated:
7
return None
8
return Schedule.objects.filter(membership__user=user, is_active=True).exclude(expires_at__lt=now()).first()
9