Merge branch 'feature/c2splits' into develop
This commit is contained in:
@@ -468,6 +468,14 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
|
||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||
totaltime = totaltime+row.df.ix[0,' ElapsedTime (sec)']
|
||||
|
||||
# with Concept2
|
||||
if source=='c2':
|
||||
try:
|
||||
totaldist = data['distance']
|
||||
totaltime = data['time']/10.
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
hours = int(totaltime/3600.)
|
||||
minutes = int((totaltime - 3600.*hours)/60.)
|
||||
@@ -532,14 +540,12 @@ def add_workout_from_stdata(user,importid,data):
|
||||
except:
|
||||
rowdatetime = datetime.datetime.strptime(data['date'],"%Y-%m-%d %H:%M:%S")
|
||||
rowdatetime = thetimezone.localize(rowdatetime).astimezone(utc)
|
||||
|
||||
|
||||
|
||||
try:
|
||||
c2intervaltype = data['workout_type']
|
||||
# try:
|
||||
# c2intervaltype = data['workout_type']
|
||||
|
||||
except:
|
||||
c2intervaltype = ''
|
||||
# except:
|
||||
# c2intervaltype = ''
|
||||
|
||||
try:
|
||||
title = data['name']
|
||||
|
||||
Reference in New Issue
Block a user