Private
Public Access
1
0

removed virtual races from sessions edit/create/view

This commit is contained in:
Sander Roosendaal
2018-09-21 10:29:51 +02:00
parent a099aea328
commit 9b7d385b1c
2 changed files with 14 additions and 14 deletions

View File

@@ -451,7 +451,8 @@ def get_sessions_manager(m,teamid=0,startdate=date.today(),
manager=m,
startdate__lte=enddate,
enddate__gte=startdate,
).order_by("preferreddate","startdate","enddate")
).order_by("preferreddate","startdate","enddate").exclude(
sessiontype='race')
return sps
@@ -462,14 +463,16 @@ def get_sessions(r,startdate=date.today(),
rower__in=[r],
startdate__lte=enddate,
enddate__gte=startdate,
).order_by("preferreddate","startdate","enddate")
).order_by("preferreddate","startdate","enddate").exclude(
sessiontype='race')
return sps
def get_my_session_ids(r):
sps = PlannedSession.objects.filter(
rower__in=[r]
).order_by("preferreddate","startdate","enddate")
).order_by("preferreddate","startdate","enddate").exclude(
sessiontype='race')
return [ps.id for ps in sps]