bug fixes
This commit is contained in:
@@ -4745,10 +4745,19 @@ def history_view(request,userid=0):
|
||||
)
|
||||
|
||||
totalsdict['distance'] = totalmeters
|
||||
totalsdict['powermean'] = df['power'].mean().astype(int)
|
||||
totalsdict['powermax'] = df['power'].max().astype(int)
|
||||
totalsdict['hrmean'] = df['hr'].mean().astype(int)
|
||||
totalsdict['hrmax'] = df['hr'].max().astype(int)
|
||||
try:
|
||||
totalsdict['powermean'] = df['power'].mean().astype(int)
|
||||
totalsdict['powermax'] = df['power'].max().astype(int)
|
||||
except KeyError:
|
||||
totalsdict['powermean'] = 0
|
||||
totalsdict['powermax'] = 0
|
||||
try:
|
||||
totalsdict['hrmean'] = df['hr'].mean().astype(int)
|
||||
totalsdict['hrmax'] = df['hr'].max().astype(int)
|
||||
except KeyError:
|
||||
totalsdict['hrmean'] = 0
|
||||
totalsdict['hrmax'] = 0
|
||||
|
||||
totalsdict['nrworkouts'] = g_workouts.count()
|
||||
|
||||
breadcrumbs = [
|
||||
|
||||
Reference in New Issue
Block a user