Private
Public Access
1
0

bug fixes

This commit is contained in:
Sander Roosendaal
2020-05-05 19:13:16 +02:00
parent 23f939c71d
commit 1052743344
2 changed files with 16 additions and 7 deletions

View File

@@ -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 = [