fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
direct debits
[wolnelektury.git]
/
src
/
club
/
helpers.py
diff --git
a/src/club/helpers.py
b/src/club/helpers.py
index
b4ef0dd
..
9bcf6df
100644
(file)
--- a/
src/club/helpers.py
+++ b/
src/club/helpers.py
@@
-8,5
+8,7
@@
from .models import Schedule
def get_active_schedule(user):
if not user.is_authenticated:
return None
def get_active_schedule(user):
if not user.is_authenticated:
return None
- return Schedule.objects.filter(membership__user=user, expires_at__gt=now()).first()
+ return Schedule.objects.filter(
+ membership__user=user
+ ).exclude(payed_at=None).exclude(expires_at__lt=now()).first()