Private
Public Access
1
0

Merge branch 'hotfix/v5.70'

This commit is contained in:
Sander Roosendaal
2018-01-23 08:45:07 +01:00
2 changed files with 9 additions and 2 deletions

View File

@@ -1335,15 +1335,19 @@ def interactive_otwcpchart(powerdf,promember=0):
def interactive_agegroup_plot(df,distance=2000,duration=None,
sex='male',weightcategory='hwt'):
if df.empty:
return '',''
age = df['age']
power = df['power']
name = df['name']
season = df['season']
if duration:
plottitle = sex+' '+weightcategory+' '+duration+' min'
duration2 = int(duration/60.)
plottitle = sex+' '+weightcategory+' %s min' % duration2
else:
plottitle = sex+' '+weightcategory+' '+distance+'m'
plottitle = sex+' '+weightcategory+' %s m' % distance
# poly_coefficients = np.polyfit(age,power,6)

View File

@@ -9389,6 +9389,9 @@ def workout_getc2workout_view(request,c2id):
except:
timezone_str = 'UTC'
if timezone_str is None:
timezone_str = 'UTC'
workoutdate = startdatetime.astimezone(
pytz.timezone(timezone_str)
).strftime('%Y-%m-%d')