Merge branch 'develop' into feature/rp3api
This commit is contained in:
@@ -239,7 +239,7 @@ def create_async_workout(alldata,user,c2id):
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:40]
|
title += t[:40]
|
||||||
except:
|
except:
|
||||||
title = 'Imported'
|
title = ''
|
||||||
|
|
||||||
weightcategory = 'hwt'
|
weightcategory = 'hwt'
|
||||||
if weightclass == "L":
|
if weightclass == "L":
|
||||||
@@ -1152,7 +1152,7 @@ def add_workout_from_data(user,importid,data,strokedata,
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:40]
|
title += t[:40]
|
||||||
except:
|
except:
|
||||||
title = 'Imported'
|
title = ''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
comments = data['comments']
|
comments = data['comments']
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ def garmin_getworkout(garminid,r,activity):
|
|||||||
durationseconds = activity['durationInSeconds']
|
durationseconds = activity['durationInSeconds']
|
||||||
duration = dataprep.totaltime_sec_to_string(durationseconds)
|
duration = dataprep.totaltime_sec_to_string(durationseconds)
|
||||||
activitytype = activity['activityType']
|
activitytype = activity['activityType']
|
||||||
name = 'Imported from Garmin'
|
name = ''
|
||||||
date = startdatetime.date()
|
date = startdatetime.date()
|
||||||
try:
|
try:
|
||||||
distance = activity['distanceInMeters']
|
distance = activity['distanceInMeters']
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ def get_polar_workouts(user):
|
|||||||
|
|
||||||
msg = Message(mailbox=workoutsbox,
|
msg = Message(mailbox=workoutsbox,
|
||||||
from_header=user.email,
|
from_header=user.email,
|
||||||
subject = 'Import from Polar Flow',
|
subject = '',
|
||||||
body=bodyyaml)
|
body=bodyyaml)
|
||||||
|
|
||||||
msg.save()
|
msg.save()
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ def create_async_workout(alldata,user,stravaid,debug=False):
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:20]
|
title += t[:20]
|
||||||
except:
|
except:
|
||||||
title = 'Imported'
|
title = ''
|
||||||
|
|
||||||
workoutdate = rowdatetime.astimezone(
|
workoutdate = rowdatetime.astimezone(
|
||||||
pytz.timezone(thetimezone)
|
pytz.timezone(thetimezone)
|
||||||
@@ -628,7 +628,7 @@ def add_workout_from_data(user,importid,data,strokedata,
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:20]
|
title += t[:20]
|
||||||
except:
|
except:
|
||||||
title = 'Imported'
|
title = ''
|
||||||
|
|
||||||
starttimeunix = arrow.get(rowdatetime).timestamp
|
starttimeunix = arrow.get(rowdatetime).timestamp
|
||||||
|
|
||||||
|
|||||||
@@ -2732,7 +2732,7 @@ def handle_c2_async_workout(alldata,userid,c2token,c2id,debug=False,**kwargs):
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:40]
|
title += t[:40]
|
||||||
except:
|
except:
|
||||||
title = 'Imported'
|
title = ''
|
||||||
|
|
||||||
weightcategory = 'hwt'
|
weightcategory = 'hwt'
|
||||||
if weightclass == "L":
|
if weightclass == "L":
|
||||||
@@ -3070,7 +3070,7 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:20]
|
title += t[:20]
|
||||||
except:
|
except:
|
||||||
title = 'Imported'
|
title = ''
|
||||||
|
|
||||||
starttimeunix = arrow.get(rowdatetime).timestamp
|
starttimeunix = arrow.get(rowdatetime).timestamp
|
||||||
|
|
||||||
|
|||||||
@@ -1316,7 +1316,7 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:20]
|
title += t[:20]
|
||||||
except:
|
except:
|
||||||
title = 'Imported'
|
title = ''
|
||||||
|
|
||||||
starttimeunix = arrow.get(rowdatetime).timestamp
|
starttimeunix = arrow.get(rowdatetime).timestamp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user