Private
Public Access
1
0

some fine tuning of plannedsession UI

This commit is contained in:
Sander Roosendaal
2018-02-14 11:27:17 +01:00
parent 55513c8470
commit 76cadea8b6
8 changed files with 166 additions and 43 deletions

View File

@@ -33,7 +33,7 @@ def add_workouts_plannedsession(ws,ps):
# check if all sessions have same date
dates = [w.date for w in ws]
if (not all(d == dates[0] for d in dates)) and ps.sessiontype != 'challenge':
if (not all(d == dates[0] for d in dates)) and ps.sessiontype not in ['challenge','cycletarget']:
errors.append('For tests and training sessions, selected workouts must all be done on the same date')
return result,comments,errors
@@ -158,7 +158,7 @@ def is_session_complete_ws(ws,ps):
status = 'partial'
if ps.sessiontype == 'session':
if ps.sessiontype in ['session','cycletarget']:
if ps.criterium == 'exact':
if ratio == 1.0:
return ratio,'completed'