Private
Public Access
1
0

teamcreate done

This commit is contained in:
Sander Roosendaal
2018-10-12 16:55:22 +02:00
parent 3cfc620906
commit a2c1777c74
10 changed files with 434 additions and 206 deletions

View File

@@ -32,27 +32,27 @@ import courses
from rowers.tasks import handle_check_race_course
def get_todays_micro(plan):
def get_todays_micro(plan,thedate=date.today()):
thismicro = None
thismacro = TrainingMacroCycle.objects.filter(
plan=plan,
startdate__lte = date.today(),
enddate__gte = date.today()
startdate__lte = thedate,
enddate__gte = thedate
)
if thismacro:
thismeso = TrainingMesoCycle.objects.filter(
plan=thismacro[0],
startdate__lte = date.today(),
enddate__gte = date.today()
startdate__lte = thedate,
enddate__gte = thedate
)
if thismeso:
thismicro = TrainingMicroCycle.objects.filter(
plan=thismeso[0],
startdate__lte = date.today(),
enddate__gte = date.today()
startdate__lte = thedate,
enddate__gte = thedate
)
if thismicro: