bug fix
This commit is contained in:
@@ -4700,7 +4700,7 @@ def history_view(request,userid=0):
|
||||
tscript,tdiv = interactive_workouttype_piechart(g_workouts)
|
||||
|
||||
totalmeters,totalhours, totalminutes, totalseconds = get_totals(g_workouts)
|
||||
|
||||
|
||||
|
||||
# meters, duration per workout type
|
||||
wtypes = list(set([w.workouttype for w in g_workouts]))
|
||||
@@ -4839,10 +4839,7 @@ def history_view_data(request,userid=0):
|
||||
ignoreadvanced=True)
|
||||
|
||||
totalmeters,totalhours, totalminutes,totalseconds = get_totals(g_workouts)
|
||||
totalminutes = "{totalminutes:02d}".format(totalminutes=totalminutes)
|
||||
|
||||
|
||||
|
||||
|
||||
# meters, duration per workout type
|
||||
wtypes = list(set([w.workouttype for w in g_workouts]))
|
||||
|
||||
@@ -4908,9 +4905,13 @@ def history_view_data(request,userid=0):
|
||||
|
||||
# interactive hr pie chart
|
||||
if typeselect == 'All':
|
||||
totalscript,totaldiv = interactive_hr_piechart(df,r,'All Workouts')
|
||||
totalseconds = 3600*totalhours+60*totalminutes+totalseconds
|
||||
totalscript,totaldiv = interactive_hr_piechart(df,r,'All Workouts',
|
||||
totalseconds=totalseconds)
|
||||
else:
|
||||
a_workouts = g_workouts.filter(workouttype=typeselect)
|
||||
hours,minutes,seconds = get_totals(a_workouts)
|
||||
totalseconds = 3600*hours+60*minutes+seconds
|
||||
ddf = getsmallrowdata_db(columns,ids=[w.id for w in a_workouts])
|
||||
try:
|
||||
ddf['deltat'] = ddf['time'].diff()
|
||||
@@ -4918,7 +4919,9 @@ def history_view_data(request,userid=0):
|
||||
pass
|
||||
ddf = dataprep.clean_df_stats(ddf,workstrokesonly=True,
|
||||
ignoreadvanced=True)
|
||||
totalscript, totaldiv = interactive_hr_piechart(ddf,r,mytypes.workouttypes_ordered[typeselect])
|
||||
totalscript, totaldiv = interactive_hr_piechart(
|
||||
ddf,r,mytypes.workouttypes_ordered[typeselect],
|
||||
totalseconds=totalseconds)
|
||||
|
||||
return JSONResponse({
|
||||
'script':totalscript,
|
||||
|
||||
Reference in New Issue
Block a user