restore
This commit is contained in:
@@ -32,6 +32,34 @@ import courses
|
||||
|
||||
from rowers.tasks import handle_check_race_course
|
||||
|
||||
def get_todays_micro(plan):
|
||||
thismicro = None
|
||||
|
||||
thismacro = TrainingMacroCycle.objects.filter(
|
||||
plan=plan,
|
||||
startdate__lte = date.today(),
|
||||
enddate__gte = date.today()
|
||||
)
|
||||
|
||||
if thismacro:
|
||||
thismeso = TrainingMesoCycle.objects.filter(
|
||||
plan=thismacro[0],
|
||||
startdate__lte = date.today(),
|
||||
enddate__gte = date.today()
|
||||
)
|
||||
|
||||
if thismeso:
|
||||
thismicro = TrainingMicroCycle.objects.filter(
|
||||
plan=thismeso[0],
|
||||
startdate__lte = date.today(),
|
||||
enddate__gte = date.today()
|
||||
)
|
||||
|
||||
if thismicro:
|
||||
thismicro = thismicro[0]
|
||||
|
||||
return thismicro
|
||||
|
||||
# Low Level functions - to be called by higher level methods
|
||||
def add_workouts_plannedsession(ws,ps,r):
|
||||
result = 0
|
||||
|
||||
Reference in New Issue
Block a user