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