Ignore next monthly clean from the next and last class
This commit is contained in:
parent
fbe61f6eec
commit
3c285ce635
|
@ -49,8 +49,8 @@ def calc_next_events():
|
||||||
# TODO, go by tag?
|
# TODO, go by tag?
|
||||||
member_meeting = sessions.filter(is_cancelled=False, course__in=[317, 413], datetime__gte=now()).first()
|
member_meeting = sessions.filter(is_cancelled=False, course__in=[317, 413], datetime__gte=now()).first()
|
||||||
monthly_clean = sessions.filter(is_cancelled=False, course=273, datetime__gte=now()).first()
|
monthly_clean = sessions.filter(is_cancelled=False, course=273, datetime__gte=now()).first()
|
||||||
next_class = sessions.exclude(course__in=[317, 413]).filter(is_cancelled=False, datetime__gte=now()).order_by('datetime').first()
|
next_class = sessions.exclude(course__in=[317, 413, 273]).filter(is_cancelled=False, datetime__gte=now()).order_by('datetime').first()
|
||||||
prev_class = sessions.exclude(course__in=[317, 413]).filter(is_cancelled=False, datetime__lte=now()).order_by('datetime').last()
|
prev_class = sessions.exclude(course__in=[317, 413, 273]).filter(is_cancelled=False, datetime__lte=now()).order_by('datetime').last()
|
||||||
|
|
||||||
if member_meeting:
|
if member_meeting:
|
||||||
cache.set('next_meeting', member_meeting.datetime)
|
cache.set('next_meeting', member_meeting.datetime)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user