diff --git a/rowers/stravastuff.py b/rowers/stravastuff.py index dc131868..aecf3c70 100644 --- a/rowers/stravastuff.py +++ b/rowers/stravastuff.py @@ -175,13 +175,14 @@ def create_async_workout(alldata,user,stravaid,debug=False): except: workouttype = 'other' + if workouttype not in [x[0] for x in Workout.workouttypes]: + workouttype = 'other' + if workouttype.lower() == 'rowing': workouttype = 'rower' if 'summary_polyline' in data['map']: workouttype = 'water' - if workouttype not in [x[0] for x in Workout.workouttypes]: - workouttype = 'other' try: comments = data['comments']