Private
Public Access
1
0

Merge tag 'v6.42' into develop

hotfix otw-bests
This commit is contained in:
Sander Roosendaal
2018-04-16 07:58:55 +02:00
4 changed files with 10 additions and 4 deletions

View File

@@ -721,7 +721,13 @@ def fetchcp(rower,theworkouts,table='cpdata'):
return pd.Series([]),pd.Series([]),avgpower2
dfgrouped = df.groupby(['workoutid'])
avgpower2 = dict(dfgrouped.mean()['power'].astype(int))
try:
avgpower2 = dict(dfgrouped.mean()['power'].astype(int))
except KeyError:
avgpower2 = {}
for id in theids:
avgpower2[id] = 0
return pd.Series([]),pd.Series([]),avgpower2
cpdf = getcpdata_sql(rower.id,table=table)

View File

@@ -198,7 +198,7 @@ class UploadOptionsForm(forms.Form):
plotchoices = (
('timeplot','Time Plot'),
('distanceplot','Distance Plot'),
('pieplot','Pie Chart'),
('pieplot','Heart Rate Pie Chart'),
)
make_plot = forms.BooleanField(initial=False,required=False)
plottype = forms.ChoiceField(required=False,

View File

@@ -13,7 +13,7 @@
</div>
<div class="grid_2 alpha">
<p>
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/addpiechart">Add Pie Chart</a>
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/addpiechart">Add HR Pie Chart</a>
</p>
</div>
<div class="grid_2 alpha">

View File

@@ -137,7 +137,7 @@
</div>
<div class="grid_2 omega">
<p>
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/addpiechart">Add Pie Chart</a>
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/addpiechart">Add HR Pie Chart</a>
</p>
</div>
<div class="grid_6 alpha">