work in progress - need to convert course time to datetime
This commit is contained in:
@@ -12664,8 +12664,20 @@ def plannedsession_view(request,id=0,rowerid=0,
|
||||
'time': w.duration,
|
||||
'type': w.workouttype,
|
||||
}
|
||||
if ps.sessiontype == 'coursetest':
|
||||
coursetimeseconds,coursecompleted = courses.get_time_course(ws,ps.course)
|
||||
intsecs = int(coursetimeseconds)
|
||||
microsecs = int(1.e6*(coursetimeseconds-intsecs))
|
||||
|
||||
wdict['time'] = datetime.timedelta(
|
||||
seconds=intsecs,
|
||||
microseconds=microsecs
|
||||
)
|
||||
|
||||
|
||||
ranking.append(wdict)
|
||||
|
||||
|
||||
# if coursetest, need to reorder the ranking
|
||||
|
||||
return render(request,'plannedsessionview.html',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user