bug fix
This commit is contained in:
@@ -11,33 +11,19 @@ workouttypes = (
|
||||
('c-boat','Dutch C boat'),
|
||||
('churchboat','Finnish Church boat'),
|
||||
('Ride','Ride'),
|
||||
# ('Kitesurf','Kitesurf'),
|
||||
('Run','Run'),
|
||||
('NordicSki','NordicSki'),
|
||||
('Swim','Swim'),
|
||||
# ('RockClimbing','RockClimbing'),
|
||||
('Hike','Hike'),
|
||||
# ('RollerSki','RollerSki'),
|
||||
('Walk','Walk'),
|
||||
# ('AlpineSki','AlpineSki'),
|
||||
# ('Snowboard','Snowboard'),
|
||||
# ('BackcountrySki','BackcountrySki'),
|
||||
# ('Snowshoe','Snowshoe'),
|
||||
('Canoeing','Canoeing'),
|
||||
# ('StairStepper','StairStepper'),
|
||||
('Crossfit','Crossfit'),
|
||||
('StandUpPaddling','StandUpPaddling'),
|
||||
# ('EBikeRide','EBikeRide'),
|
||||
# ('Surfing','Surfing'),
|
||||
# ('Elliptical','Elliptical'),
|
||||
# ('VirtualRide','VirtualRide'),
|
||||
('IceSkate','IceSkate'),
|
||||
('WeightTraining','WeightTraining'),
|
||||
('InlineSkate','InlineSkate'),
|
||||
# ('Windsurf','Windsurf'),
|
||||
('Kayaking','Kayaking'),
|
||||
('Workout','Workout'),
|
||||
# ('Yoga','Yoga'),
|
||||
('other','Other'),
|
||||
)
|
||||
|
||||
@@ -54,8 +40,8 @@ stravamapping = {
|
||||
'c-boat':'Rowing',
|
||||
'churchboat':'Rowing',
|
||||
'Ride':'Ride',
|
||||
'Kitesurf':'other',
|
||||
'Run':'Run',
|
||||
'NordicSki':'NordicSki',
|
||||
'Swim':'Swim',
|
||||
'Hike':'Hike',
|
||||
'Walk':'Walk',
|
||||
|
||||
@@ -165,7 +165,7 @@ def create_async_workout(alldata,user,stravaid,debug=False):
|
||||
try:
|
||||
workouttype = mytypes.stravamappinginv[data['type']]
|
||||
except:
|
||||
workouttype = 'rower'
|
||||
workouttype = 'other'
|
||||
|
||||
if workouttype.lower() == 'rowing':
|
||||
workouttype = 'rower'
|
||||
@@ -446,7 +446,7 @@ def add_workout_from_data(user,importid,data,strokedata,
|
||||
try:
|
||||
workouttype = mytypes.stravamappinginv[data['type']]
|
||||
except KeyError:
|
||||
workouttype = 'rower'
|
||||
workouttype = 'other'
|
||||
|
||||
if workouttype.lower() == 'rowing':
|
||||
workouttype = 'rower'
|
||||
|
||||
Reference in New Issue
Block a user