Private
Public Access
1
0

get dates timeperiod updates to work better with local time zones

This commit is contained in:
Sander Roosendaal
2021-09-21 11:04:36 +02:00
parent 8205fd3c3f
commit 5b11413068
8 changed files with 170 additions and 27 deletions

View File

@@ -2511,7 +2511,10 @@ def history_view_data(request,userid=0):
ddict['hrmax'] = 0
ddict['powermean'] = int(wavg(ddf,'power','deltat'))
ddict['powermax'] = ddf['power'].max().astype(int)
try:
ddict['powermax'] = ddf['power'].max().astype(int)
except KeyError:
ddict['powermax'] = 0
ddict['nrworkouts'] = a_workouts.count()
listofdicts.append(ddict)