import cross training allowed
This commit is contained in:
@@ -941,7 +941,7 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
|
||||
workouttype = 'rower'
|
||||
|
||||
if workouttype not in [x[0] for x in Workout.workouttypes]:
|
||||
workouttype = 'water'
|
||||
workouttype = 'other'
|
||||
try:
|
||||
comments = data['comments']
|
||||
except:
|
||||
@@ -1088,7 +1088,7 @@ def add_workout_from_runkeeperdata(user,importid,data):
|
||||
# To Do - add utcoffset to time
|
||||
workouttype = data['type']
|
||||
if workouttype not in [x[0] for x in Workout.workouttypes]:
|
||||
workouttype = 'water'
|
||||
workouttype = 'other'
|
||||
try:
|
||||
comments = data['notes']
|
||||
except:
|
||||
@@ -1261,7 +1261,7 @@ def add_workout_from_runkeeperdata(user,importid,data):
|
||||
def add_workout_from_stdata(user,importid,data):
|
||||
workouttype = data['type']
|
||||
if workouttype not in [x[0] for x in Workout.workouttypes]:
|
||||
workouttype = 'water'
|
||||
workouttype = 'other'
|
||||
try:
|
||||
comments = data['comments']
|
||||
except:
|
||||
@@ -1291,11 +1291,16 @@ def add_workout_from_stdata(user,importid,data):
|
||||
|
||||
try:
|
||||
res = splitstdata(data['distance'])
|
||||
distance = res[1]
|
||||
times_distance = res[0]
|
||||
except KeyError:
|
||||
return (0,"No distance data in the workout")
|
||||
try:
|
||||
res = splitstdata(data['heartrate'])
|
||||
times_distance = res[0]
|
||||
distance = 0*times_distance
|
||||
except KeyError:
|
||||
return (0,"No distance or heart rate data in the workout")
|
||||
|
||||
distance = res[1]
|
||||
times_distance = res[0]
|
||||
|
||||
try:
|
||||
l = data['location']
|
||||
|
||||
Reference in New Issue
Block a user