some fine tuning of plannedsession UI
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user