Merge branch 'hotfix/v5.70'
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user